Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 822
  • Last Modified:

how to check real user id of login session ?

how can I see/check the real user id of current login session ?

id -r doesn't seems to work
0
beer9
Asked:
beer9
1 Solution
 
omarfaridCommented:
try

/usr/xpg4/bin/id -ur
0
 
beer9Author Commented:
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
 
TintinCommented:
You could do

echo $LOGNAME

or

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now