Solved

how to check real user id of login session ?

Posted on 2008-10-23
3
811 Views
Last Modified: 2013-12-27
how can I see/check the real user id of current login session ?

id -r doesn't seems to work
0
Comment
Question by:beer9
3 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 22787384
try

/usr/xpg4/bin/id -ur
0
 

Author Comment

by:beer9
ID: 22787912
it is still giving me effective user id, not the real user id..

bash-3.00# /usr/xpg4/bin/id -ur
0
bash-3.00# who am i
beer     pts/2        Oct 23 21:47    (192.168.0.2)
bash-3.00# whoami
root
bash-3.00#

0
 
LVL 48

Accepted Solution

by:
Tintin earned 125 total points
ID: 22792300
You could do

echo $LOGNAME

or

who am i | awk '{print $1}'
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now