Getting NT Login - revisited...

I know this question has seen some action in the past... but I am having issues.

I would like to get the NT LOGIN from REMOTE_USER, AUTH_USER, or WindowsIdentity.

I use this simple test code to check what Request Vars are available:

<TABLE border="1">
<TR>
<TD><B>Server Variable</B></TD>
<TD><B>Value</B></TD>
</TR>
<% For Each name In Request.ServerVariables %>
<TR>
<TD> <%= name %> </TD><TD> <%= Request.ServerVariables(name) %></TD>
</TR>
<% Next %>
</TABLE>

both REMOTE_USER and AUTH_USER are blank... Anyone know why this is? I am in an intranet environment running IIS 5.0. Can someone help me find something that works? I really only need the nt login username, I can then perform validation/control through LDAP queries using ColdFusion or ASP.
AndyBeckwithAsked:
Who is Participating?
 
golfDoctorConnect With a Mentor Commented:
0
 
golfDoctorCommented:
Are you using NT Authentication for the Intranet users?  If not, they are still anonymous, and REMOTE_USER will only return IP address, if anything.  Login name will not be available if anonymous on intranet.
0
 
j2nkuCommented:
You have to remove the anonymous access to your web page (from IIS) - if removed, users must log in with their NT logins and you can get their username with AUTH_USER after they have logged in. No other way.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
AndyBeckwithAuthor Commented:
So is there anyway to have IE automatically login? Sort of like Single Sign on?
0
 
golfDoctorCommented:
No auto sign on, but may be able to have setting to remember login after first time.
0
 
golfDoctorCommented:
Or you could set up accounts for everyone in IIS, and have it use the NT Authentication, that should bypass signon...maybe?
0
 
AndyBeckwithAuthor Commented:
Going a little further, would any of you know how to automate the process of creating IIS accounts from the NT accounts that already exist?
0
 
golfDoctorCommented:
IIS should be able to read NT accounts, without needing to set up new.  Should just be a setting in IIS.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.