Here's the situation. I have a jython 2.1 script in a shared account that needs to know who is calling it. In bash, I can simply use $(who -m) and it will give me the correct username.
By "shared account", I mean I log in as myself, then $(sudo su - shared_account) to get to the shared account.
I haven't been able to find anything in java (or jython) that would give me a similar result. Even trying to call Runtime.getRuntime().exec("who -m") doesn't do anything. When I try to read the InputStream from the process returned by exec, the stream is empty.