Retrieve User NT login 
Author Message
 Retrieve User NT login

Hi
I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages
running on IIS accessing SQL Svr. Users connect anonymously.

How can I retrieve the user's NT login account name? (VBScript/JavaScript
running...?)

Thanks
-mike



Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
you can retrive the NT user logged onto your application.
as I know you cannot retrieve the LOCALLY logged user.

request.servervariables("Logon_user")

--
Miguel Ferreira


Quote:
> Hi
> I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages
> running on IIS accessing SQL Svr. Users connect anonymously.

> How can I retrieve the user's NT login account name? (VBScript/JavaScript
> running...?)

> Thanks
> -mike



Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
remove anonymous access and in asp reference:
Request.ServerVariables("LOGON_USER")


Quote:
> Hi
> I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages
> running on IIS accessing SQL Svr. Users connect anonymously.

> How can I retrieve the user's NT login account name? (VBScript/JavaScript
> running...?)



Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
"...Users connect anonymously..."

Therefore you can't - Request.ServerVariables("Logon_user") will be blank.

I you disable Anonymous and use NT Challenge/Response or Basic Authentication, you can.

--
Michael Harris
MVP Scripting

you can retrive the NT user logged onto your application.
as I know you cannot retrieve the LOCALLY logged user.

request.servervariables("Logon_user")

--
Miguel Ferreira


Quote:
> Hi
> I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages
> running on IIS accessing SQL Svr. Users connect anonymously.

> How can I retrieve the user's NT login account name? (VBScript/JavaScript
> running...?)

> Thanks
> -mike



Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
Would be a piece of cake with it, but I HAVE to use anonymous access.
I thought there are some addin-scripts around to get the NT login.....

-gg


Quote:
> "...Users connect anonymously..."

> Therefore you can't - Request.ServerVariables("Logon_user") will be blank.

> I you disable Anonymous and use NT Challenge/Response or Basic

Authentication, you can.
Quote:

> --
> Michael Harris
> MVP Scripting




Quote:
> you can retrive the NT user logged onto your application.
> as I know you cannot retrieve the LOCALLY logged user.

> request.servervariables("Logon_user")

> --
> Miguel Ferreira



> > Hi
> > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP
pages
> > running on IIS accessing SQL Svr. Users connect anonymously.

> > How can I retrieve the user's NT login account name?

(VBScript/JavaScript

- Show quoted text -

Quote:
> > running...?)

> > Thanks
> > -mike



Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
With anon access the only way is a client-side ActiveX control.  You'd need
to write it yourself (easy, can't be more than 4 lines of code) or find one
that already does what you want.  Then get them all signed as safe to use.


Sat, 07 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
... will that also run on non-MS browsers?

Do you know some existing solutions around?

Thank you
Mike


Quote:
> With anon access the only way is a client-side ActiveX control.  You'd
need
> to write it yourself (easy, can't be more than 4 lines of code) or find
one
> that already does what you want.  Then get them all signed as safe to use.



Sun, 08 Sep 2002 03:00:00 GMT  
 Retrieve User NT login

Quote:
> ... will that also run on non-MS browsers?

Not if they don't support ActiveX controls.


Sun, 08 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
What about NN in that case?


Quote:
> > ... will that also run on non-MS browsers?

> Not if they don't support ActiveX controls.



Sun, 08 Sep 2002 03:00:00 GMT  
 Retrieve User NT login

Quote:
> What about NN in that case?

This is microsoft.public.inetserver.asp.db.  A client-side object getting
the logged on user via NN is neither MS, IIS nor ASP.  Try a client-side NN
group.


Sun, 08 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
NN doesn't support ActiveX...

--
Michael Harris
MVP Scripting

What about NN in that case?


Quote:
> > ... will that also run on non-MS browsers?

> Not if they don't support ActiveX controls.



Sun, 08 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
If you want to get the username that is currently logged in on the server
itself, not through iis. You can get by making a VB DLL which calls the
getusername function. The vb code should look like this:

Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA"
(ByVal lpBuffer As String, nSize As Long) As Long

Public Function GetCurrentUser() As String
  Dim strWork as string
  strWork = Space(255)
  GetUserName strWork, 255
  GetCurrentUser = Left(strWork, InStr(strWork, Chr(0)) - 1)
End Function

Hope this helps,
Jan Geert Hek


Quote:
> Would be a piece of cake with it, but I HAVE to use anonymous access.
> I thought there are some addin-scripts around to get the NT login.....

> -gg



> > "...Users connect anonymously..."

> > Therefore you can't - Request.ServerVariables("Logon_user") will be
blank.

> > I you disable Anonymous and use NT Challenge/Response or Basic
> Authentication, you can.

> > --
> > Michael Harris
> > MVP Scripting



> > you can retrive the NT user logged onto your application.
> > as I know you cannot retrieve the LOCALLY logged user.

> > request.servervariables("Logon_user")

> > --
> > Miguel Ferreira



> > > Hi
> > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP
> pages
> > > running on IIS accessing SQL Svr. Users connect anonymously.

> > > How can I retrieve the user's NT login account name?
> (VBScript/JavaScript
> > > running...?)

> > > Thanks
> > > -mike



Mon, 09 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
Okay, if you can't get the username (anonymously), is there a way to get the
"Computer Name"?

Rgds...Geoff


Quote:
> Hi
> I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages
> running on IIS accessing SQL Svr. Users connect anonymously.

> How can I retrieve the user's NT login account name? (VBScript/JavaScript
> running...?)

> Thanks
> -mike



Mon, 09 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
I don't believe so.  I think the server variable will always return the IP.

<%=Request.ServerVariables("REMOTE_HOST") %>

--
Richard Cook
NetData4
http://www.netdata4.net

---
Please respond in the newsgroup so that
others may participate in the thread.
---

Quote:
> Okay, if you can't get the username (anonymously), is there a way to get
the
> "Computer Name"?

> Rgds...Geoff



> > Hi
> > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP
pages
> > running on IIS accessing SQL Svr. Users connect anonymously.

> > How can I retrieve the user's NT login account name?

(VBScript/JavaScript
Quote:
> > running...?)

> > Thanks
> > -mike



Mon, 09 Sep 2002 03:00:00 GMT  
 Retrieve User NT login
Yes...that's what I'm doing now......we have a little online helpdesk - it
would be nice to get the user's pc name....

Ah well...I'll keep trying...

Rgds...Geoff


Quote:
> I don't believe so.  I think the server variable will always return the
IP.

> <%=Request.ServerVariables("REMOTE_HOST") %>

> --
> Richard Cook
> NetData4
> http://www.netdata4.net

> ---
> Please respond in the newsgroup so that
> others may participate in the thread.
> ---


> > Okay, if you can't get the username (anonymously), is there a way to get
> the
> > "Computer Name"?

> > Rgds...Geoff



> > > Hi
> > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP
> pages
> > > running on IIS accessing SQL Svr. Users connect anonymously.

> > > How can I retrieve the user's NT login account name?
> (VBScript/JavaScript
> > > running...?)

> > > Thanks
> > > -mike



Mon, 09 Sep 2002 03:00:00 GMT  
 
 [ 20 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Retrieve User NT login

2. Retrieving NT user login permissions

3. Retrieving NT user login permissions

4. NH: Need to have user login with their NT login

5. How can you retrieve NT login

6. Retrieving NT Password for Login Name

7. How to retrieve current user's login?

8. Retrieve User NT Logon

9. Retrieve NT User Name

10. Retrieving NT User Perms from global/Local Grps and Srv Shares

11. Retrieving User NT Logon

12. retrieve NT user id

 

 
Powered by phpBB® Forum Software