Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Windows login information in java

Reply
Thread Tools

Windows login information in java

 
 
GenxLogic
Guest
Posts: n/a
 
      07-31-2006
Hi All,
i want windows login information in my java application.
can anybody help?

Thanks in Advance
Deepak Kumar

 
Reply With Quote
 
 
 
 
Michael Rauscher
Guest
Posts: n/a
 
      07-31-2006
GenxLogic schrieb:
> Hi All,
> i want windows login information in my java application.
> can anybody help?


import java.util.Iterator;
import java.util.Map;

public class Test {
public static final void main( String args[] ) {
for ( Map.Entry<Object,Object> entry :
System.getProperties().entrySet() )
System.out.println(entry.getKey()+": "+entry.getValue());
}
}

Perhaps you'll find the wanted informationen there.

Bye
Michale
 
Reply With Quote
 
 
 
 
GenxLogic
Guest
Posts: n/a
 
      07-31-2006
could you write the logic in proper syntax.
Thanks
Michael Rauscher wrote:
> GenxLogic schrieb:
> > Hi All,
> > i want windows login information in my java application.
> > can anybody help?

>
> import java.util.Iterator;
> import java.util.Map;
>
> public class Test {
> public static final void main( String args[] ) {
> for ( Map.Entry<Object,Object> entry :
> System.getProperties().entrySet() )
> System.out.println(entry.getKey()+": "+entry.getValue());
> }
> }
>
> Perhaps you'll find the wanted informationen there.
>
> Bye
> Michale


 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      07-31-2006
GenxLogic schrieb:
> could you write the logic in proper syntax.


That *is* "proper syntax".

If it doesn't compile,
- install Java 1.5
- OR replace the for by an Iterator loop
- OR just use System.out.println(System.getProperties());
 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      07-31-2006
Simon wrote:

> - OR replace the for by an Iterator loop


(after removing everything in between "<" and ">")
 
Reply With Quote
 
Jeffrey H. Coffield
Guest
Posts: n/a
 
      07-31-2006
GenxLogic wrote:
> Hi All,
> i want windows login information in my java application.
> can anybody help?
>
> Thanks in Advance
> Deepak Kumar
>


private String username = System.getProperty("user.name");
 
Reply With Quote
 
jamie.eyre@gmail.com
Guest
Posts: n/a
 
      08-22-2006
Hi,
The only problem with using this method is that it is possible to
change your USERNAME system property to something else (i.e. admin) via
a command propmt (set USERNAME=admin), and then start the application.
If the application is started in the same command dialog, the
application would then get this new name (i.e. admin), when calling
System.getProperty("user.name");

I also would like to get the windows user name from the client, but i
do not like this method due to the above reason. Does anybody else have
another idea?

Thanks,
Jamie

Jeffrey H. Coffield wrote:
> GenxLogic wrote:
> > Hi All,
> > i want windows login information in my java application.
> > can anybody help?
> >
> > Thanks in Advance
> > Deepak Kumar
> >

>
> private String username = System.getProperty("user.name");


 
Reply With Quote
 
Richard Wheeldon
Guest
Posts: n/a
 
      08-28-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I also would like to get the windows user name from the client, but i
> do not like this method due to the above reason. Does anybody else have
> another idea?


The jaas framework will return OS-specific login information if
requested - including Windows usernames and domains and Unix user/group
IDs,

Richard
 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      08-28-2006
If you mean Windows Active Directory and you mean you have a Web
Application ...

Google "NTLM Authentification" and JCIFS.


GenxLogic wrote:
> Hi All,
> i want windows login information in my java application.
> can anybody help?
>
> Thanks in Advance
> Deepak Kumar


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows login information jamie.eyre@gmail.com Java 5 08-23-2006 12:44 PM
More Information than just IIS Log Information subrato ASP .Net 8 03-14-2006 09:59 PM
signer information does not match signer information of other classes in the same package clercmedia Java 2 12-09-2005 03:14 PM
strange information from asp.net trace / getting performance information using WebRequest and StreamReader z. f. ASP .Net 0 02-03-2005 11:23 AM
Windows Login Information Venu Vinod N Javascript 1 10-30-2003 05:12 AM



Advertisments