Solved

how to check real user id of login session ?

Posted on 2008-10-23
3
816 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

635 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