Solved

how to check real user id of login session ?

Posted on 2008-10-23
3
814 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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.

735 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