-
Authenticating Username & Password
Hi All,
I want to use NT authentication in one of my projects, but I'm having trouble
determining whether the entered Username & Password is valid for the current
domain. The app requires a user to enter a Username & Password every time
a certain task is executed and different users will operate the app on the
same machine.
I have no problem getting the user info with 'NetUserGetInfo' in 'netapi32',
but I can't determine whether it's a valid password or not. The password
returned from the USER_INFO_EXT_API type is blank - for obvious reasons 
Can anybody tell me how to take a Username and Password and authenticate
it on the current domain ?
TIA
Johan
-
Re: Authenticating Username & Password
You can use LogonUser, which requires the SE_TCB_NAME privilege. This
privilege must be manually added as it is not granted to anyone by default,
not event an Administrator.
+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
Monte Hansen
http://KillerVB.com
+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
"Johan" <johan.grobler@ensemble.co.za> wrote in message
news:3af27b31$1@news.devx.com...
>
> Hi All,
>
> I want to use NT authentication in one of my projects, but I'm having
trouble
> determining whether the entered Username & Password is valid for the
current
> domain. The app requires a user to enter a Username & Password every time
> a certain task is executed and different users will operate the app on the
> same machine.
>
> I have no problem getting the user info with 'NetUserGetInfo' in
'netapi32',
> but I can't determine whether it's a valid password or not. The password
> returned from the USER_INFO_EXT_API type is blank - for obvious reasons 
>
> Can anybody tell me how to take a Username and Password and authenticate
> it on the current domain ?
>
> TIA
> Johan
-
Re: Authenticating Username & Password
You can use LogonUser, which requires the SE_TCB_NAME privilege. This
privilege must be manually added as it is not granted to anyone by default,
not event an Administrator.
+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
Monte Hansen
http://KillerVB.com
+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+
"Johan" <johan.grobler@ensemble.co.za> wrote in message
news:3af27b31$1@news.devx.com...
>
> Hi All,
>
> I want to use NT authentication in one of my projects, but I'm having
trouble
> determining whether the entered Username & Password is valid for the
current
> domain. The app requires a user to enter a Username & Password every time
> a certain task is executed and different users will operate the app on the
> same machine.
>
> I have no problem getting the user info with 'NetUserGetInfo' in
'netapi32',
> but I can't determine whether it's a valid password or not. The password
> returned from the USER_INFO_EXT_API type is blank - for obvious reasons 
>
> Can anybody tell me how to take a Username and Password and authenticate
> it on the current domain ?
>
> TIA
> Johan
-
Re: Authenticating Username & Password
Johan,
http://gethelp.devx.com/techtips/nt_.../10min0498.asp
http://gethelp.devx.com/techtips/nt_.../10min0598.asp
--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.devx.com/gethelp>
"Johan" <johan.grobler@ensemble.co.za> wrote in message
news:3af27b31$1@news.devx.com...
>
> Hi All,
>
> I want to use NT authentication in one of my projects, but I'm having
trouble
> determining whether the entered Username & Password is valid for the
current
> domain. The app requires a user to enter a Username & Password every time
> a certain task is executed and different users will operate the app on the
> same machine.
>
> I have no problem getting the user info with 'NetUserGetInfo' in
'netapi32',
> but I can't determine whether it's a valid password or not. The password
> returned from the USER_INFO_EXT_API type is blank - for obvious reasons 
>
> Can anybody tell me how to take a Username and Password and authenticate
> it on the current domain ?
>
> TIA
> Johan
-
Re: Authenticating Username & Password
Johan,
http://gethelp.devx.com/techtips/nt_.../10min0498.asp
http://gethelp.devx.com/techtips/nt_.../10min0598.asp
--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.devx.com/gethelp>
"Johan" <johan.grobler@ensemble.co.za> wrote in message
news:3af27b31$1@news.devx.com...
>
> Hi All,
>
> I want to use NT authentication in one of my projects, but I'm having
trouble
> determining whether the entered Username & Password is valid for the
current
> domain. The app requires a user to enter a Username & Password every time
> a certain task is executed and different users will operate the app on the
> same machine.
>
> I have no problem getting the user info with 'NetUserGetInfo' in
'netapi32',
> but I can't determine whether it's a valid password or not. The password
> returned from the USER_INFO_EXT_API type is blank - for obvious reasons 
>
> Can anybody tell me how to take a Username and Password and authenticate
> it on the current domain ?
>
> TIA
> Johan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks