Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

client NT username

Status
Not open for further replies.

sandeepmur

Programmer
Dec 14, 2003
295
PT
Hi,

How can I obtain the NT username of a client machine ? I need the username to later compare this with the username in the Active Directory. appreciate some examples.

TIA,

sg
 

You cannot, AFAIK, do this in JavaScript. You might need to use a server-side language or ActiveX, etc.

Hope this helps,
Dan
 
Ok so how do I obtain the NT username using JSP or ActiveX ?? I can test using the tomcat but the production env runs only weblogic.

I am researching which I understand permits obtaining the info I need but I am kinda lost there.

Appreciate any help asap.

thnx again
 

The JSP solution would be outside the scope of this forum. And while the implementation of the ActiveX soution might be in JS, I don't know of any general ActiveX control to do this, so you might try asking in another forum for this, anyway.

Hope this helps,
Dan
 
Hi,

I got obtain the NT user name using ActiveX but the problem is it works fine in my local drive but If I try to load the page via my tomcat, gives me an error:

Automation server can't create object.

THe function:

function ntuser(){
var WshNetwork = new ActiveXObject("WScript.Network");
alert(WshNetwork.UserName);
}

any suggestions as to what the problem is ?? do i hv to configure tomcat?

thnx
 
I think the problem is with your IE settings. You won't have to play with any settings on Tomcat. Look into changing your internet (zone?) using the Internet options menu (under Tools).

Jeff
 
You might try these forums for more definitive answers, this is only a JavaScript Forum
Tomcat forum877
ActiveX forum194
JSP forum695
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top