Solved

how to check real user id of login session ?

Posted on 2008-10-23
3
812 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

813 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

17 Experts available now in Live!

Get 1:1 Help Now