Page 1 of 1 1
Topic Options
#62986 - 2002-02-08 07:05 PM Capture Machine SID
Anonymous
Unregistered


I'm trying to capture the SID's of all the machines in the NT4 domain to a file, so I can monitor for duplicate SID's. I'm suspecting there are duplicate SID's created by a client ghosting process not done correctly. The @SID command won't work for me, as it collects the User SID.

Can I capture a registry key that contains this information?
If anyone can help, I'd appreciate it.

Thanks.

Paul P.

Top
#62987 - 2002-02-08 07:52 PM Re: Capture Machine SID
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey paul, i can't test this script because i'm at home not on a network (so i can't enuerate machines), but here's a script that will show the SID's of users. You should be able to chnage "user" to "computer" and it might work:

Here's the steps:

1) Get yourself a Windows 2K or Windows XP box and login as Domain Admin.

2) Download this zip file from Microsoft. It's the ADSI SDK. We only want one DLL in there called adssecurity.dll

ADSI SDKp

Extract the one dll into a folder somewhere (system32 would be good) and run this:

regsvr32 addsecurity.dll

you should get a messagebox saying component registered ok.

3) Download this script using wordpad and run it. It should display all the user's in your domain and their SID's

4) Change "user" to "computer" and give it a go - luck !


break on


$adssid = createobject("adssid")


$domain = getobject("WinNT://@LDOMAIN")


; Filter for just users [change to computer]...


$domain.filter = "user",""


; For each object, lookup sid ...


for each $object in $domain


$adssid.setas(5,$object.adspath)


? $object.name " = " $adssid.getas(1)


next


exit 1

-Shawn

Top
#62988 - 2002-02-08 08:11 PM Re: Capture Machine SID
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
oops, after re-reading your post, I get the feeling you want to do this in the LOGIN SCRIPT ... never mind.

-Shawn

Top
#62989 - 2002-02-08 08:25 PM Re: Capture Machine SID
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well... the cloning software I use (PowerQuest) has a DOS based SIDCHNGR.EXE that can be used to query and not change the SID. Maybe your's can do likewise.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#62990 - 2002-02-08 08:38 PM Re: Capture Machine SID
Anonymous
Unregistered


Shawn: I don't necessarily need to do this with a logon script. I just need the results.
Does this active directory tool run without active directory?

LLigetfa:
I need to do this for 500 machines. Going to each machine to run a utility is not an option.
Thanks anyway.

Top
#62991 - 2002-02-08 08:44 PM Re: Capture Machine SID
Will Hetrick Offline
Hey THIS is FUN

Registered: 2001-10-02
Posts: 320
Loc: Harrisburg, PA USA
Here is a little utility from Microsoft that takes care of Dupluicate SIDS from the login script.

Microsoft NDTSutil

_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!

Top
#62992 - 2002-02-08 09:02 PM Re: Capture Machine SID
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Paul,

Yeah, it should run fine. We're using the backward compatible WinNT service provider that works in an NT domain. All you need to run the script is a Windows 2K or XP workstation and the reskit dll registered... give it a shot ...

-Shawn

Top
#62993 - 2002-02-08 10:15 PM Re: Capture Machine SID
Anonymous
Unregistered


Thanks Shawn.
Will Try.

Will Hetrick:
That'd work great if I had 2000 AD.
Thanks anyway.

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 1821 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.062 seconds in which 0.033 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