🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14030

Re: Verify User Password / LogonUser

#14030
From: Eyyub Volkan �ektimur
Date: Fri, 05 Sep 2003 20:37
45 lines
2640 bytes
Anyway , i solved the problem and here is the solution;

to use "LogonUser" process needs "act as a part of operating system" right
but i couldn't found where to give this access and then i learned that
microsoft removed this obligation (the right needed) on XP & Win2003 Server.
But my op. system is Win2000 so i was still need that. then learned how to
do that; from control panel / administrative tools/local security policy

when i gave that right to my user, function start to work correctly.

here is a sample ;

LogonUser(user_name,NULL,password,LOGON32_LOGON_NETWORK,LOGON32_PROVIDER_DEF
AULT,&hToken);
CloseHandle(hToken);

have a nice day....

"Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr>, haber iletisinde �unlar�
yazd�:3f573b9d@newsgroups.borland.com...
> hi,
>
> i'm using "NetUserGetInfo" method to obtain more info about windows users.
> As naturally it don't return password knowledge. I need to control an
> entered password does match with Windows User's password. Something like;
>
> bool ControlPassword(username,password)
>
> i found a method "LogonUser" and i thought i can use it but later i read
> that it needs SE_TCB_NAME privilege ! and only SYSTEM user holds that.
>
> As Brief ;
>
> * I need a WinApi method returns that user is valid or not (username and
> password)
>   bool ValidUser(username,password)
> * Is there a way to use "LogonUser" method ?
>
> thanks for help
> ___________________________________
> Eyyub Volkan �ektimur
> Proya Software & Trade Inc.
> Head of Core Development Department
>
>
Technical Details
Message-ID: <3f58f3e4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f573b9d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,256043d002c94eea
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-05 13:39:48 PST
From: "Eyyub Volkan �ektimur" <evcektimur@prokon.com.tr>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f573b9d@newsgroups.borland.com>
Subject: Re: Verify User Password / LogonUser
Date: Fri, 5 Sep 2003 23:37:42 +0300
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 213.204.126.36
Message-ID: <3f58f3e4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062794212 213.204.126.36 (5 Sep 2003 13:36:52 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail