How do we check for Windows Registered users?

How do we check for Windows Registered users? Is there
any API in C to check Username and Password? or any
samples.

BOOL ret;
PHANDLE handle=NULL;
ret=LogonUserA(“hemanth”,NULL,“hk”,3,1,handle);
printf(“%d\n”,GetLastError());
if(ret != 0)
printf(“Sucess\n”);

When we run the above sample code we are getting 1314
as error code(A required privilege is not held by the
client)


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

U may use the Active Directory API’s or WMI
-----Original Message-----
From: udhaya kumar [mailto:xxxxx@yahoo.com]
Sent: Thursday, January 09, 2003 10:02 AM
To: NT Developers Interest List
Subject: [ntdev] How do we check for Windows Registered users?

How do we check for Windows Registered users? Is there
any API in C to check Username and Password? or any
samples.

BOOL ret;
PHANDLE handle=NULL; ret=LogonUserA(“hemanth”,NULL,“hk”,3,1,handle);
printf(“%d\n”,GetLastError());
if(ret != 0)
printf(“Sucess\n”);

When we run the above sample code we are getting 1314
as error code(A required privilege is not held by the
client)


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


You are currently subscribed to ntdev as: xxxxx@wipro.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hai,

Yah i saw these messages.

But i don’t know how to use.

Can u please guide me

Regards

Udhaya

U may use the Active Directory API’s or WMI

From: udhaya kumar [mailto:xxxxx@yahoo.com]
Sent: Thursday, January 09, 2003 10:02 AM
To: NT Developers Interest List
Subject: [ntdev] How do we check for Windows
Registered users?

How do we check for Windows Registered users? Is
there
any API in C to check Username and Password? or any
samples.

BOOL ret;
PHANDLE handle=NULL;
ret=LogonUserA(“hemanth”,NULL,“hk”,3,1,handle);
printf(“%d\n”,GetLastError());
if(ret != 0)
printf(“Sucess\n”);

When we run the above sample code we are getting
1314
as error code(A required privilege is not held by
the
client)


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up
now.
http://mailplus.yahoo.com


You are currently subscribed to ntdev as:
xxxxx@wipro.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com


You are currently subscribed to ntdev as:
xxxxx@yahoo.com
To unsubscribe send a blank email to
xxxxx@lists.osr.com


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Only processes with SE_TCB_PRIVILEGE may call LogonUser and related API
until XP. So, if you really need to get a token, you have to run with
privileges.

If you just want to verify, there’s a well-travelled trick using SSPI in
which you pretend to be the NTLM client. It’s in several KB entries, you
can look it up.

If you just want to check the name and don’t really care about the
password, see the APIs that read the directory.