Verifying a user-id exists

  • Thread starter Thread starter Mike Russelo
  • Start date Start date
M

Mike Russelo

How can I verify a user-id has a domain account given only the user-id
(if I don't have the password)?
 
Mike Russelo said:
How can I verify a user-id has a domain account
given only the user-id (if I don't have the password)?

Here is one way:

Pass to DsGetDCName() the name of a domain. That will get you the name of
the server on which the domain controller runs. Then you can use that server
name in a call NetUserEnum() to enumerate all of the accounts in the domain
or NetUserGetInfo() to retrieve information about a particular account.

Of course, you may need account operator privileges or some such to access
the data.

Regards,
Will
 
Back
Top