• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

how to get NT username of logged-in user

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 27364
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic