how to retrieve localhost's credentials

hi, im tryin to list a server's shares and with the java library i found, it needs credentials that will be used for authentication. But im also trying to list the local computer's shares if the inputted server name or IP is not valid or reachable. And it still needs credentials even if i'm only listing local shares.

are there classes that can retrieve the current user's credentials?

[404 byte] By [.jahdiel.a] at [2007-10-3 4:01:36]
# 1
There may be a way to do that with SSL or the Java Cryptography API - other than that, you got me.
watertownjordana at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 2
you might find something you need under here http://java.sun.com/j2se/1.5.0/docs/guide/security/jaas/spec/I'm not sure exactly what credentials you're after so can't help further
sorabaina at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 3
ok. the credentials i need are the username, password and domain.
.jahdiel.a at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 4
You are talking about the OS or NOS login, correct? (i.e. Windows Login, NetWare login)You could try reading the registry - search Google for that.However, anything you get is likely to require JNI middleware.JNLP might help, try also searching Sun sites.
watertownjordana at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 5
yes. i just need the username, password and domain of the current user. are there open source libraries that might have classes that does this?
.jahdiel.a at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 6
>I just need the username, password and domain of the current user.I would NOT like to see, say, an applet taking the current user's (that is, my) username and password.
BIJ001a at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 7

> I would NOT like to see, say, an applet taking

> the current user's (that is, my) username and

> password.

I second the motion to quash the tactic. Or, should we all put our skills together and unleash an a wave of applets that do nothing but get the user name and password and ssn and while were at it why not their credit cards, car keys, and their shopping list.

Guess what shampoo Bill uses?

watertownjordana at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 8
There is no API that will give you a user's password. Why would there be?For the rest, find yourself a Java implementation of Samba.
ejpa at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 9
> For the rest, find yourself a Java implementation of Samba.Such as JCIFS.
DrClapa at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 10
thats just it. im using JCIFS. tryin to list local shares and it asks for the username,domain AANND THE PASSWORD..
.jahdiel.a at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...
# 11
You'll have to get the password from the user.It would be a major security breach if there was an API that told an application what a user's password was.
ejpa at 2007-7-14 22:00:51 > top of Java-index,Core,Core APIs...