Pilosopong Tasyo wrote:Did you mean perform a command as another user? If this is the case you can use sudo -u.
He/she meant that while being su-ed to root you can execute the command "logname" to display the username of the user you're su-ing with
@swift, it might be a distro-issue? It works fine on my RHEL6-laptop, not my Mint-netbook.
This topic might explain it fairly well I think? http://forums.gentoo.org/viewtopic-t-28 ... art-0.html
Basically Debian/Ubuntu/Mint logs sessions (usernames) in a different location than where logname is looking. The solution posted there is no longer valid though, my Linux Mint 11 doesn't even have an inittab anymore... :S
However, in directory /etc/init, I do see tty[1-6].conf, which hold relating data.