• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get NT username of logged-in user  RSS feed

 
Akash Abrol
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i hav a intranet website in which i want to get username of the currently logged in user..

can anybody tell me how to do it

any help will be highly appreciated..

Thanks
Akash.
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to know the NT user-name of the person using the Web browser?

If so, I would very much hope that is impossible. Would you want Web site owners to be able to get hold of your user-name, just by the fact that you browsed their site? I think not!

I think there are ways to integrate authentication on a Web site with authentication on the operating system. I don't know much about these, but I would guess that these still do not allow the server-side code to get hold of the user name or password, just whether they were valid or not.
 
Paul Clapham
Sheriff
Posts: 22719
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agreed, in general... but the question did specifically mention an intranet website, where that sort of thing is more acceptable. And for Windows environments there's jCIFS which includes NTLM authentication. If you use this to authenticate your users then you automatically know their user ID.

http://jcifs.samba.org/src/docs/ntlmhttpauth.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!