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

how to check real user id of login session ?

Posted on 2008-10-23
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
Question by:beer9
LVL 40

Expert Comment

ID: 22787384

/usr/xpg4/bin/id -ur

Author Comment

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

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

LVL 48

Accepted Solution

Tintin earned 125 total points
ID: 22792300
You could do



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

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

840 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