aspose file tools*
The moose likes Java in General and the fly likes windows  user name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "windows  user name" Watch "windows  user name" New topic
Author

windows user name

james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
hi,
I need to know which user has logged in machine(windows os),that means username id and password for windows Nt. how can be this down in java ..is any way....


Regards,
James
Joe Gilvary
Ranch Hand

Joined: May 11, 2001
Posts: 152
Getting the actual password requires finding (another)
security hole in Windows.
Getting the user name is the user.name property.
Look up the Javadocs for System.getProperty().
If you're looking for single sign on kinds of capabilities,
there are several good books on Java security. It will
require additional non-Java code on the Windows side.
Thanks,
Joe
james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
hi,
I am just looking on getting tha username only.
In system.property(JDK1.3) i was not able to found anything related with this.
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2579

Originally posted by james edwin:
hi,
I am just looking on getting tha username only.
In system.property(JDK1.3) i was not able to found anything related with this.

You can get the user name by -

Moreover, the following code should list all the system properties for you.

Let me know if it helps.
HTH,
- Manish
james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
Thanks manish..........It helped.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: windows user name