How do i know my currently logged on userid in Solaris/Unix
Hi
Lets say i telnet using putty to my server i logged in as normal ( lets say "guest" ) then i type "who am i" This one works nice i know guest is logged on but there is a problem after i logged on as guest i do "su - oracle" for example and provide correct password how do i know that my "guest" userid already changed to "oracle" i type who am i still "guest" is showing up. Thanks. |
Try "whoami" rather than "who am i".
The first displays the effective user, the latter is an invocation of "who" (that displays logged on users, etc - see man who) and is equivalent to "who -m". |
apparently it is not working
i am using solaris who - m will still give me username i logged on first time using putty there is no whoami command in Solaris any idea? thanks |
Quote:
/usr/ucb/whoami and so is its System V equivalent: /usr/bin/id |
Moved: This thread is more suitable in <Solaris> and has been moved accordingly to help your thread/question get the exposure it deserves.
|
All times are GMT -5. The time now is 05:39 PM. |