It is currently Thu May 23, 2013 6:01 pm


All times are UTC - 5 hours [ DST ]


Register for Windows Forums


New posts Register

Register for Windows Forums now to gain access to: post messages, download free books, competitions for great prizes, and get to know others. Members also see NO ADVERTS. Join today!




 Page 1 of 1 [ 1 post ] 
Message Author
 
 Post subject: Problem in getting the SID of user
New postPosted: Mon Feb 20, 2012 1:22 am 

I’m writing an application on Windows XP which gives the SID of user.

With the valid Token Handle, when I call GetTokenInfomation API with TokenUser as a second parameter then every time & for all user account I get Valid SID in PTOKEN_USER structure variable.

Valid Sid => Sid is S-1-5-21-1121170692-2157880286-4158546613-1000

Here RID is => 1000

But when I use NetQueryDisplayInformation API with NET_DISPLAY_USER as a information level (second parameter) then I get NET_DISPLAY_USER structure as a out Parameter.

User123 is my one account which has the administrative rights.

With the help of NET_DISPLAY_USER structure when I call to LookupAccountName API with variable of NET_DISPLAY_USER.usri1_name as a name of the user account then for a User123 account I get SID without RID.

e.g.
Like this => Sid is S-1-5-21-1121170692-2157880286-4158546613

For other account with same procedure gives me the correct SID i.e. SID with RID
e.g.
Valid Sid => Sid is S-1-5-21-1121170692-2157880286-4158546613-1000

Please provide me any pointers for returning SID without RID in second case.

Thanks in Advance


Years of membership
User avatar
New Kid on the Block
New Kid on the Block

Joined: Fri Feb 17, 2012 2:36 am
Posts: 1
Thanks given: 0 times
Thanks received: 0 times
Location: India
 Profile E-mail  
 
Offline
Display posts from previous:  Sort by  
 Page 1 of 1 [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: