I'm trying to get the real username of any user running as root on my server. On one of my server running Sol 10, if I su to root and run who am i, it displays my username. which is what I want.
But when I run it on another server, this time on Sol 8, it displays root as the user. Is there anyway to get the actual user name?
Very true.....
The required output is to display the real username, instead of displaying root as the user.
who am seems to work ok on my sol 10 servers, but on this sol 8, it's not. It keeps displaying that the real user is root.
Note I su to root on the server as opposed to login in as root. So it should really display my login name.