LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 04-02-2010, 01:56 AM   #1
ragingcheetah
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Rep: Reputation: 0
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?
 
Old 04-02-2010, 07:24 AM   #2
ordinary
Member
 
Registered: Apr 2007
Location: the Rocket City
Distribution: Debian, Ubuntu, CentOS; in days past Fedora, Solaris, SunOS, 4.2BSD, 4.3BSD, SVR4, AIX, HP-UX
Posts: 101

Rep: Reputation: Disabled
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

Last edited by ordinary; 04-02-2010 at 07:29 AM.
 
Old 04-03-2010, 12:14 AM   #3
ragingcheetah
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Original Poster
Rep: Reputation: 0
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).
 
Old 04-03-2010, 06:34 PM   #4
DukeSSD
Member
 
Registered: Sep 2007
Posts: 88

Rep: Reputation: 20
Quote:
Originally Posted by ragingcheetah View Post
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.
 
Old 04-03-2010, 11:43 PM   #5
ragingcheetah
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DukeSSD View Post

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.
 
Old 04-04-2010, 03:11 AM   #6
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
"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
 
Old 04-06-2010, 10:15 PM   #7
ragingcheetah
LQ Newbie
 
Registered: Apr 2008
Posts: 9

Original Poster
Rep: Reputation: 0
@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
 
  


Reply

Tags
aix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spaces and escaped spaces pslacerda Linux - Newbie 13 12-20-2008 09:03 AM
spaces in filenames dotancohen Programming 12 02-17-2006 02:42 PM
Way to many spaces LuderForChrist Linux - Newbie 4 06-25-2004 02:29 PM
terminals and spaces Hitokiri_X Linux - General 4 06-16-2002 12:41 AM
spaces WindowsDefector Linux - Newbie 2 05-23-2002 02:03 AM


All times are GMT -5. The time now is 04:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration