Page 1 of 1 1
Topic Options
#46634 - 2003-10-14 11:58 AM How can I get SID of my Workstation
Luziekix Offline
Getting the hang of it

Registered: 2003-02-27
Posts: 68
Hi,

how can I get the SID of my Workstation (Windows XP) - NOT the users SID ?

Or do I understand something wrong, and only Users have a SID ?

Regards,

Luziekix

Top
#46635 - 2003-10-14 01:41 PM Re: How can I get SID of my Workstation
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I have several methods by which you can get this information. Please tell me how you wish to gather it, what your reason is to get this info, and how you wish to use it.

I will dig up the code today.

[ 14. October 2003, 13:42: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46636 - 2003-10-14 03:58 PM Re: How can I get SID of my Workstation
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
Go to HKEY_USERS, the SID ending with -500 and which does not correspond to the other SIDs with regards ot the segments before the last dash is the computer's SID. The -500 indicates the local administrator account.
_________________________
There are two types of vessels, submarines and targets.

Top
#46637 - 2003-10-14 04:01 PM Re: How can I get SID of my Workstation
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Good, easy solution Jens if the Admin user is logged on.

This key is better:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

as all profiles are listed all the time.

[ 14. October 2003, 16:05: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46638 - 2003-10-14 04:04 PM Re: How can I get SID of my Workstation
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
Or a remote admin script to collect the SIDs from all computers.
_________________________
There are two types of vessels, submarines and targets.

Top
#46639 - 2003-10-15 07:10 PM Re: How can I get SID of my Workstation
Luziekix Offline
Getting the hang of it

Registered: 2003-02-27
Posts: 68
Hi,

sorry for my late response.

We are using cloning here to install workstations, and I want to write a script which logs the workstations name and the workstation-SID into a plain text-file.

We just want to ensure, that thereīs no two workstations with the same SID.

SID is changed with NewSID from Sysinternals or GHOSTWALK from Symantec GHOST.

Regards,

Luziekix

[ 15. October 2003, 19:11: Message edited by: Luziekix ]

Top
#46640 - 2003-10-16 04:44 AM Re: How can I get SID of my Workstation
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11162
Loc: Boston, MA, USA
SysPrep itself should also change the SID automatically, thus no need for external tools. So, just run an admin script every night that collects SIDs (e.g. via registry, as suggested) and then compares them with a list of existing SIDs. Fastest way would be to have a .INI file for this.
_________________________
There are two types of vessels, submarines and targets.

Top
#46641 - 2003-10-16 09:37 PM Re: How can I get SID of my Workstation
Kdyer Offline
KiX Supporter
*****

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

We are using cloning here to install workstations

Sysprep as Jens stated works great with Ghost. Just make sure that under XP that you choose the "seal" option. The wizard for Sysprep for 2000/XP are pretty easy to follow.

You should do this from RIS and GhostCast. We are able to do a 2GB image to a workstation in about 5-7 minutes.

Kent

[ 16. October 2003, 21:39: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#46642 - 2003-10-21 02:02 PM Re: How can I get SID of my Workstation
Luziekix Offline
Getting the hang of it

Registered: 2003-02-27
Posts: 68
OK,

finally I found a Freeware-utility to get me the Workstations-SID called "PsGetSID"

at:

http://www.sysinternals.com/ntw2k/freeware/pstools.shtml

Thank you all,

Luziekix

Top
#46643 - 2003-10-21 02:05 PM Re: How can I get SID of my Workstation
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Don't know why you had to keep searching for an external utility when we gave you a method to get the information long ago using KiXtart.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#46644 - 2006-10-19 11:07 AM Re: How can I get SID of my Workstation
Luziekix Offline
Getting the hang of it

Registered: 2003-02-27
Posts: 68
Iīm back after a long time ...

by comparing the results from Sysinternals PSGETSID-Utility
and by my own following script:

Code:
 
$Index=0
:LOOP1
$ValueName = ENUMKEY("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList", $Index)
; ? $ValueName
If @ERROR = 0
$PartValue=Right($ValueName,4)
$Index = $Index + 1
If $PartValue="-500"
$x=LEN($ValueName)-4
$WSSID=Left($ValueName,$x)
? $WSSID
Endif
goto Loop1
Endif

GET $X



I get different results. The problem is, that my script stops at the first key found which is ending with -500 an displays this as Workstation-SID. However there is another key ending with -500 on my computer and this "last" key ending with -500 should be the right workstation-SID from the SID-History.

Anyone can please tell me how I can alter my code to correct this,
or a better way to enumerate the last key ending with -500.
---> UPDATE: Itīs NOT the last key found ending with -500.
So I need to determine a way to find out which one of the -500 is the right ...

Regards,

Luziekix


Edited by Luziekix (2006-10-19 01:24 PM)

Top
Page 1 of 1 1


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

Who's Online
1 registered (vertage) and 155 anonymous users online.
Newest Members
vertage, dimi575, Drecksnacken, Nlill, webtools321
17735 Registered Users

Generated in 0.035 seconds in which 0.011 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