• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

system properties

 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tell me how to proceed !!
i have a java application (nothing but a collection of jsp pages) where i authenticate the contents of the jsp page by a user name password , what i need is that this username and password should be taken directly from the windows system!! to be more clear the user if authorised to enter into the windows system then he should be also auhorised to use my application.
is there any class in java to do this or can anyone givea smaple code.
 
Mo Ibrahim
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting the user name is easy. You can get the logged-in user name by executing "cmd echo %username%" in a process and read the stream using an InputBufferStreamReader.
But, you will not be able to get the password from windows because of encoding. I heard someone say that you can set a registry key and get the password out. I do not know how. I am also looking for a way to figure out a solution to this problem. If you find out, please post it.
 
Peter Kristensson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find it hard to believe that the username is stored in plain text anywhere on your windows system. If this was the case, someone would probably have found out by now, and used this information with malicous intent.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that it is possible with JAAS (PAM framework)
There is a native module nt.dll for Windows NT.
Links
<install-dir>/jaas1_0/jaasmod1_0-win/doc http://java.sun.com/products/jaas/index-14.html

Pierre-Fran´┐Żois Lemosquet
Wokup! http://www.wokup.fr
 
jasonkosowan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yikes, this is a bit tough. Remind me why we can't just use .htaccess?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic