NT Authentification

Results 1 to 7 of 7

Thread: NT Authentification

  1. #1
    Wizardtry Guest

    Default NT Authentification

    Does anyone know how to grab the NT username and password from an ASP page? I need the username and password from their NT account to verify that they have rights to view certain data. Thanks for you help.

  2. #2
    Bill J Guest

    Default RE: NT Authentification

    username = Request.ServerVariables("AUTH_USER")<BR>passwd = Request.ServerVariables("AUTH_PASSWORD")<BR>*note the password will only be collected fo basic authentication<BR><BR>That should do it

  3. #3
    Wizardtry Guest

    Default RE: NT Authentification

    Thanks Bill, I will give it a try.

  4. #4
    Wizardtry Guest

    Default RE: NT Authentification

    Could you explain in a little more detail, I havn&#039t done this yet and I don&#039t quite understand. Thanks.

  5. #5
    al dawg Guest

    Default RE: NT Authentification

    You should just be able to protect the file or directory and add them to the appropriate places to see the files they need to see. No messing around with web pages

  6. #6
    Join Date
    Dec 1969

    Default RE: NT Authentification

    If you remove general access to everybody from your asp file<BR>and your users are using NT and not coming through a proxy NT authentication should occur, the user name is available through<BR>Request.ServerVariables("AUTH_USER")<BR >A password should not be needed as the authentication is automatic.<BR>If you really need to check before accessing a page you could<BR>download and use the Permission Checker component from http://www.microsoft.com/iis/<BR><BR>Set pChk=Server.CreateObject("IISSample.PermissionChec ker")<BR>If pChk.HasAccess("secretadmin.asp") Then<BR> Response.Write "&#060;A HREF=secretadmin.asp&#062;Admin Page&#060;/A&#062;"<BR>End If<BR><BR>

  7. #7
    Bill J Guest

    Default RE: NT Authentification

    Ok simple. In IIS right click on the dirctory/site you that you wish to be secure. Click on directory security, the first option given, you will select. Here you will uncheck anonymous authentication and either check NT or Basic, or both.<BR><BR>Then in your .asp page put in<BR>TheUserNameIs = Request.ServerVariables("AUTH_USER")<BR><BR>This pulls the username they authenticted to, note they have to successfully log on for this to work.<BR><BR>Now if they log on using basic authentication you can use.<BR>ThePasswordIs = Request.ServerVariables("AUTH_PASSWORD")<BR><BR>If they log in without using basic, i.e. NT you&#039ll have to follow the other suggestion to get the permissions checker from microsoft.<BR><BR>Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts