1

We need a java application to run on both solaris and windows machines and they are kerberized. We use JGSS to get the Princiapl corresponding to the logged-in user in Solaris, by specifying the loction of credential cache that is stored in KRB5CCNAME. Since windows doesn't store the details in a file like solaris does, and since we don't want to use NTSystem to get the logged-in user's name, is there a generic way to get these details from a java program? I see a lot of references mentioning about JSSE and SSPI to get these details.

Could someone please help?

Vikdor
  • 23,934
  • 10
  • 61
  • 84

1 Answers1

0

There is a function which returns informations similar to what you have asked. And for logged in user name, it is used as

String username = System.getProperty("user.name");
Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
Himanshu
  • 113
  • 6
  • 1
    The system property user.name is not **reliable** because one can run the class with `-Duser.name=abc` and the actual logged in user can be xyz. – Vikdor Mar 13 '11 at 15:27