Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i using following code to check the login, its working with in the domain.

Example:

MY machine is registered under 'A' Domain. Then i can able to test the A Domain Users.
but i can't able to use this to test 'B' Domain Users.

C++
LogonUser("B\\india", "B", "B*#123",LOGON32_LOGON_INTERACTIVE ,LOGON32_PROVIDER_DEFAULT,&phToken)


i tried like that also

C++
LogonUser("india", "B", "B*#123",LOGON32_LOGON_INTERACTIVE  ,LOGON32_PROVIDER_DEFAULT,&phToken)


but if i try

C++
LogonUser("test", "A", "A*#123",LOGON32_LOGON_INTERACTIVE  ,LOGON32_PROVIDER_DEFAULT,&phToken)

- its working fine.
Posted
Updated 14-Dec-12 22:47pm
v2

1 solution

The 'B' domain users must each have "Log On Locally" permissions granted on the second machine. Or else the second machine must also be joined to 'B' domain.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900