Getting NT User Login Name 
Author Message
 Getting NT User Login Name

I am trying to write a VBScript that would allow me to track NT login user
that has visited my webpage.

I tried using the Response.ServerVariables("LOGON_USER") but to no avail.

Does anyone knows how to do this.

Thanks.



Sat, 29 Dec 2001 03:00:00 GMT  
 Getting NT User Login Name
try this !
Request.ServerVariables("LOGON_USER")


Sat, 29 Dec 2001 03:00:00 GMT  
 Getting NT User Login Name
That will work, but this will only work if the user has been authenticated
by the web server.

- Jeff


Quote:
> try this !
> Request.ServerVariables("LOGON_USER")



Sat, 29 Dec 2001 03:00:00 GMT  
 Getting NT User Login Name
Thanks. It seems that all other ServerVariables work for me. eg. REMOTE_HOST
..etc, except for LOGON_USER which continuously give me empty string.

I have ensure that i have logon to the webserver.

Is there other settings that is preventing me from getting the user name?


Quote:
> That will work, but this will only work if the user has been authenticated
> by the web server.

> - Jeff



> > try this !
> > Request.ServerVariables("LOGON_USER")



Sun, 30 Dec 2001 03:00:00 GMT  
 Getting NT User Login Name
AUTH_USER and REMOTE_USER and LOGON_USER will be non-blank _only_ if you use
authentication.  If you allow anonymous access, they will be blank.

Here's a simple ASP that will display all of the available ServerVariables
with names and values.  Try it with and without authentication to see which
gives you what you need...

<HTML>
<HEAD>
<TITLE> Server Variables </TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<%
response.write "<pre>"
response.write "Request.ServerVariables<br>"
response.write "-----------------------<br>"
set vars = request.servervariables
for each var in vars
  response.write var & "="&request.servervariables(var) & "<br>"
next
response.write "</pre>"
%>
</BODY>
</HTML>

--
Michael Harris


| Thanks. It seems that all other ServerVariables work for me. eg.
REMOTE_HOST
| ..etc, except for LOGON_USER which continuously give me empty string.
|
| I have ensure that i have logon to the webserver.
|
| Is there other settings that is preventing me from getting the user name?
|


| > That will work, but this will only work if the user has been
authenticated
| > by the web server.
| >
| > - Jeff
| >


| > > try this !
| > > Request.ServerVariables("LOGON_USER")
| > >
| > >
| > >
| >
| >
|
|



Sun, 30 Dec 2001 03:00:00 GMT  
 Getting NT User Login Name
Thank you, you are right. It works now.


Quote:
> AUTH_USER and REMOTE_USER and LOGON_USER will be non-blank _only_ if you
use
> authentication.  If you allow anonymous access, they will be blank.

> Here's a simple ASP that will display all of the available ServerVariables
> with names and values.  Try it with and without authentication to see
which
> gives you what you need...

> <HTML>
> <HEAD>
> <TITLE> Server Variables </TITLE>
> </HEAD>

> <BODY BGCOLOR="#FFFFFF">
> <%
> response.write "<pre>"
> response.write "Request.ServerVariables<br>"
> response.write "-----------------------<br>"
> set vars = request.servervariables
> for each var in vars
>   response.write var & "="&request.servervariables(var) & "<br>"
> next
> response.write "</pre>"
> %>
> </BODY>
> </HTML>

> --
> Michael Harris



> | Thanks. It seems that all other ServerVariables work for me. eg.
> REMOTE_HOST
> | ..etc, except for LOGON_USER which continuously give me empty string.
> |
> | I have ensure that i have logon to the webserver.
> |
> | Is there other settings that is preventing me from getting the user
name?
> |


> | > That will work, but this will only work if the user has been
> authenticated
> | > by the web server.
> | >
> | > - Jeff
> | >


> | > > try this !
> | > > Request.ServerVariables("LOGON_USER")
> | > >
> | > >
> | > >
> | >
> | >
> |
> |



Mon, 31 Dec 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Getting NT Users LOGIN NAME?

2. LDB Viewer -- Need to get NT user login name in addition to computer name

3. getting current login user name

4. Full user name from NT login ID

5. Need Help Getting User's Group From Login Account on NT

6. Getting User's NT Login programatically

7. Getting USers Login Name

8. Getting user LOGIN name from Windows?

9. Getting Netware Login User Id under NT

10. Help with getting the login name of the user who is blocking

11. how to get NT login user name

12. Get the login name from a Wondows NT-User

 

 
Powered by phpBB® Forum Software