Page 1 of 1 1
Topic Options
#58918 - 2001-09-07 06:34 PM ADSI and security rights
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
I have hit a weird problem...

I am trying to list all of the members of the local group Administrators on a NT workstation (brycetest) in a different domain(garts) then myself.

here is the code using the ADSI OpenDSObject method.

code:

$group = GetObject("WinNT:").OpenDSObject("WinNT://garts/brycetest/administrators", "garts\<userid>", "<password>", 1)

? "@error:@serror"
for each $member in $group.members
? $member.name
? "@error:@serror"
next

? "@error:@serror"


Using the OpenDSObject I am only able to show local accounts that are in the Administrators not any of the domain accounts.

Using the following method I am able to display all members of Administrators.

code:

use "\\brycetest\ipc$$" /user:'garts\<username>' /password:<password>
$group = GetObject("WinNT://garts/brycetest/administrators")
? "@error:@serror"
for each $member in $group.members
? $member.name
? "@error:@serror"
next
use "\\brycetest\ipc$$" /d

I am at a loss....

Bryce

[ 07 September 2001: Message edited by: Bryce ]

Top
#58919 - 2001-09-07 09:08 PM Re: ADSI and security rights
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Bryce,

Hmmm.. Hmmm... Hmmm..

I just tried it here and works great for querying a machine across to another domain. Are both of these Domain controlled by 2000 PDCs? And I am going to assume that you are a Domain Admin on Both Domains and you have Administrative Access to the box you are querying and the one that you are initiating the query from..

I made some tweaks with your code, but should be the same..

code:

break on cls

$OtherDomain = "Garts"
$AdminID = "bryce"
$AdminPass = "<password>"
$WkstatoQuery = "brycetest"

use "\\$OtherDomain\ipc$$" /user:'$OtherDomain\$AdminID' /password:$AdminPass
$group = GetObject("WinNT://$OtherDomain/$WkstatoQuery/administrators")
? "@error:@serror"
for each $member in $group.members
? $member.name
? "@error:@serror"
next
use "\\$WkstatoQuery\ipc$$" /d


Thanks!

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#58920 - 2001-09-08 01:10 AM Re: ADSI and security rights
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
I can get it to work too if i map to the IPC$ share, but mapping to the IPC$ share has made other errors show up, not all of the ADSI things work right.....

Both Domains are NT4.0

I was really wanting to use the OpenDSObject method also.

Bryce

Top
#58921 - 2001-09-10 01:53 PM Re: ADSI and security rights
mvdw Offline
Starting to like KiXtart

Registered: 2001-05-01
Posts: 124
Loc: Voorburg, Netherlands
hmzz,

i am beginning to get the feeling that the ADSI WinNT: provider wasn't given as much attention as perhaps the LDAP provider.

which is somewhat understandable as i understood that it isn't microsoft's primary goal to support NT4, they'd probably rather see you implement 2k/XP with Active Directory.

see also Flaw in enumerating properties.

quite annoying.

_________________________
rgrds, Maarten

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 661 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.053 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org