Saturday, June 26, 2010

Identify SID Using DSQUEY Command

Here are a couple of options to identify the SID of a user using DSQUERY command.

Option #1
dsquery user -samid 11111| dsget user –sid

image

Option #2
dsquery * -Filter "(SamAccountName=11111)" -Attr objectSID

image

Note:  You can use “dsquery  computer” command to get the SID of a computer.

DSQUERY

2 comments:

Can you reverse that and get user info from a SID

Sure.
Dsquery * -Filter "(ObjectSID=S-1-1-1-1)" -Attr Name samAccountName

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More