Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

GetTokenInformation returns same sid for different computers

Hi,

Iam using

LogonUser(
        L"user1", // usr name
        L"x", // domain
        L"xxx", // pass
        LOGON32_LOGON_NEW_CREDENTIALS,
        LOGON32_PROVIDER_DEFAULT,
        &handle
        );

and

GetTokenInformation(
         handle,         // handle to the access token
         TokenGroupsAndPrivileges,    // get information about the token's groups
         (LPVOID) ptg,   // pointer to TOKEN_GROUPS buffer
         dwLength,       // size of buffer
         &dwLength       // receives required buffer size
         ))

It returns same sid if i change user, pass and domain.
0
lavitz
Asked:
lavitz
1 Solution
 
Sinisa VukCommented:


Hi!

you should use LOGON32_LOGON_INTERACTIVE instead of LOGON32_LOGON_NEW_CREDENTIALS.

Sinisa V.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now