Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NT Authentication

Status
Not open for further replies.

Bkster

Technical User
Jan 25, 2002
94
US
Here is what I want to do. I work in an NT Intranet enviroment. I would like to build a page that uses the users NT Authentication information as the login information. I would like the username (rsmith1) to be a session variable that I can carry throughout the application. I have installed a Forum (Snitz) that does this. When I open the forum it reads you are logged on as Smith, Robert (rsmith1). I would like to know where they are pulling the first and last name from. I would also like how to insert this into my database. If someone could just point me in the right direction I would appreciate it.

Thanks


Brian
 
There is multiple ways they can do this.

Firstly the site cannot be set to allow anonymous access.

Secondly, you can then get the full username for the user from Request.ServerVariables("logon_user")

This will include the domain name i.e. Domain\Username

You can then use this to extract data from a database to use the login name to look up the full name, or you could use ADSI to acces the active directory and perform a lookup to retrieve that information.

Not exactly sure how to do this but I am sure that there will be an example on MSDN.

Hope this helps,

James :) James Culshaw
james@miniaturereview.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top