LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   REAL_USER is spaces after login (https://www.linuxquestions.org/questions/aix-43/real_user-is-spaces-after-login-799524/)

ragingcheetah 04-02-2010 01:56 AM

REAL_USER is spaces after login
 
Hi all,
after login in my aix session, no value is being populated in REAL_USER.
i checked the /etc/setenv_user file and found the following line
REAL_USER=`/bin/usr -uid` (some similar line, i have forgotten as i am not
export REAL_USER with my system now)

I ran the script setenv_user with ksh -x (we use korn shell) for debugging purpose.
i could see that atleast inside the script the required value is getting populated in REAL_USER. However, after running the script when i give the command "echo $REAL_USER", it displays me no value.
Can any one please help me out with this?

ordinary 04-02-2010 07:24 AM

I don't know what purpose REAL_USER serves, but if it is to survive the script, I believe you need either

Quote:

export REAL_USER=whatever
or

Quote:

REAL_USER=whatever
export REAL_USER
Is REAL_USER exported after it is set?

On the other hand, it is possible that REAL_USER is just for use inside that particular script.

Good luck,
Phil

ragingcheetah 04-03-2010 12:14 AM

Yes Sir!
The script does have the statement "export REAL_USER" after the value of REAL_USER being set in the preceeding statement using "REAL_USER=`/usr/xpg4/bin/id -urn`"....

It seems that REAL_USER is used to extract the user that has logged in (i am not sure).

DukeSSD 04-03-2010 06:34 PM

Quote:

Originally Posted by ragingcheetah (Post 3922529)
Yes Sir!
The script does have the statement "export REAL_USER" after the value of REAL_USER being set in the preceeding statement using "REAL_USER=`/usr/xpg4/bin/id -urn`"....

It seems that REAL_USER is used to extract the user that has logged in (i am not sure).

On my systems /usr/xpg4 does not exist so the command will not produce any output, does the file /usr/xpg4/bin/id exist on your system?

If it does exist what output does the command /usr/xpg4/bin/id -urn produce?

If it produces the expected output from the command line then you need to look at the differences in the scripts shell from your users shell.

ragingcheetah 04-03-2010 11:43 PM

Quote:

Originally Posted by DukeSSD (Post 3923284)

If it produces the expected output from the command line then you need to look at the differences in the scripts shell from your users shell.

yeah!!! it is indeed producing the expected output.
i am so sorry that i couldnt get the statement "you need to look at the differences in the scripts shell from your users shell".

can you please explain me the steps as in how to do it.

paulsm4 04-04-2010 03:11 AM

"xpg4" is for X/Open compatibility:

http://en.wikipedia.org/wiki/X/Open

X/Open is *not* an intrinsic part of AIX, and the entire "/usr/xpg4" probably won't even exist on most flavors of *nix. Certainly not any Linux systems. So it's not really portable, and I'd discourage your relying on it if you can avoid it.

So what's a reasonable alternative?

How about "$USER"?

Or "$LOGNAME"?

IMHO .. PSM

ragingcheetah 04-06-2010 10:15 PM

@paulsm4
==========
so sorry, it seems that by mistake i gave some what wrong information.
the exact line in my /etc/setenv_user script is
REAL_USER=`/bin/id -urn`
export REAL_USER.

The baffling thing is that REAL_USER is getting populated in
development region and the production region. However, it is not
getting populated in QA region. I hope this will provide some more insight
into the problem


All times are GMT -5. The time now is 03:06 AM.