Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single user can't login? Check the SID of a user

Single user can't login? Check the SID of a user

by  computerhighguy  Posted    (Edited  )
Every once in a while, a single user will not be able to login no matter where they try. Check the SID. The SID in the database must match the SID in AD.


VBScript to determine a User's SID in AD
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set objAccount = objWMIService.Get _
    ("Win32_UserAccount.Name='OCSUser1',Domain='Contoso'")
Wscript.Echo objAccount.SID

Use DBAnalyze.exe from the OCS resrouce kit. Run the following command.
Code:
DBAnalyze /report:user /user:<sip uri of user>

Snooper Version: 3.0.6362.0

Report created at 7/25/2008 6:59:59 AM on CON-OCS-SE01.Contoso.com.


User : ocsuser1@contoso.com
------------------------------------------------
Resource Id : 1
Home server : CON-OCS-SE01.Contoso.com
GUID : 1e35404d-7938-4ac8-a5ba-e270ce6747ea
SID : S-1-5-21-3196233165-1280936689-530780249-1148
Display Name : OCSUser1
OptionFlags : 262
ArchivingFlags : 0
Enabled : True
MovingAway : False
Unavailable : False
RichMode : True
Contact Version : 6
Permission Version : 1
Email : OCSUser1@Contoso.com
Phone : (xxx) xxx-xxxx
Presence data :
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top