Obtaining Windows Nt username with javascript 
Author Message
 Obtaining Windows Nt username with javascript

Hi,

If I have logged successfully to my windows Nt domain. I want to user my
internet explorer to query the username of the user and also obtain  all the
group he is in.

Thank a lot
Sailesh



Fri, 07 Feb 2003 03:00:00 GMT  
 Obtaining Windows Nt username with javascript

Client side or server side?

On the client, you would need to use something like the WScript.Network object, but that will
require permission from the user (unsafe control).  On the server, you would need to be an
authenticated site and get the username via Request.ServerVariables("AUTH_USER").  In both cases,
you would then use ADSI to get the groups of which the user is a member.

--
Michael Harris
MVP Scripting

"It always helps to read the documentation first..."

Hi,

If I have logged successfully to my windows Nt domain. I want to user my
internet explorer to query the username of the user and also obtain  all the
group he is in.

Thank a lot
Sailesh



Fri, 07 Feb 2003 03:00:00 GMT  
 Obtaining Windows Nt username with javascript


Fri, 19 Jun 1992 00:00:00 GMT  
 Obtaining Windows Nt username with javascript

Hi All,

    I trying to implement a Single Sign-On for a web application.  I would like
my Web Server (running on a different host machine) to serve a page (with some
VBScript/JScript/Wscript ) to the user and  read the network login id and domain
of the user.

    Is that possible?  Any examples and ideas from people who have tried this
before would be of great help.

    I tried to generate the HTML page from the Server containing the following
piece of code as explained WScript samples:

              Set WshNetwork = WScript.CreateObject("WScript.Network")
              Set oDrives = WshNetwork.EnumNetworkDrives
              Set oPrinters = WshNetwork.EnumPrinterConnections
              WScript.Echo "Domain = " & WshNetwork.UserDomain
              WScript.Echo "Computer Name = " & WshNetwork.ComputerName
              WScript.Echo "User Name = " & WshNetwork.UserName
              WScript.Echo

    However I get a Run-Time error when the scripts tries to execute on the
browser.  Any hints to solve my problem?

    Thanks for your kind response.

Vijay

Quote:

> Hi,

> If I have logged successfully to my windows Nt domain. I want to user my
> internet explorer to query the username of the user and also obtain  all the
> group he is in.

> Thank a lot
> Sailesh

  vsitaram.vcf
< 1K Download


Sun, 06 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Obtaining Windows Nt username with javascript

2. SSO - Obtaining Windows Nt username

3. Problems Installing Windows Script 5.0 and Windows Script Host 2.0 Beta on Windows NT 4.0

4. NT Login Username and Computer Name

5. get nt username?

6. VBscript to return the current NT username ??

7. help with nt username or environment variable.

8. Get Username from NT using VBScript

9. Getting NT username environment variable

10. Retrieving NT UserName Description

11. vbscript verify nt username & password

12. NT Username

 

 
Powered by phpBB® Forum Software