cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with .profile

Issue with .profile

I have inherited a server from a previous Admin running 11.23. The .profile for root is setup correctly. The user profiles are OK. However, when I log in as a user and su to root, all of the env variables are lost like it is a Default load. I looked at /etc/profile and that looks ok. Does anyone know where the issue might be? excuse me for asking such a 'basic' question.
Yesterday was the first day of the rest of your life
6 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Issue with .profile

Unless you use "su - root", it will not source root's .profile.
Steven E. Protter
Exalted Contributor

Re: Issue with .profile

Shalom,

/etc/profile is a general file that all users source.

the .profile file for root is only intended for super user/root.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor

Re: Issue with .profile

> [...] I log in as a user and su to root, [...]

> Unless you use "su - root", [...]

As usual, it would be more helpful to show
the actual commands you used, instead of
vague descriptions and interpretations.

Re: Issue with .profile

That's it. It was su -root. In the future, I will use examples. Thanks!
Yesterday was the first day of the rest of your life

Re: Issue with .profile

Thanks
Yesterday was the first day of the rest of your life
James R. Ferguson
Acclaimed Contributor

Re: Issue with .profile

Hi Lawrence:

That's not surprising, really. Have a look at the 'SU_KEEP_ENV_VARS' declaration in the '/etc/default/security' file manpages:

http://www.docs.hp.com/en/B3921-60631/security.4.html

In the absence of a file, the default actions apply.

Regards!

...JRF...