problem with su

Hi,

I have some troubles when using command su.
+ I created an user in a machine Sun blade100:
user/user with home: /export/home/user.
in /export/home/user/.bash_profile, I set the variable PATH as the same in /.bash_profile of root.

+ in /etc/passwd, the home directory of user is /export/home/user (bash sell)

+ when I login as root, the variable PATH of root is set correctly. But when I su to user, the variable PATH of user is changed.

please help me to overcome this problem, thanks in advance

Regards

have you exported the path-variable?
# PATH=$PATH:/usr/local/bin
# export PATH

g P

yes, I did it

When you use "su", do you just use the "su" command or "su - root" ?

Try "su - root" to log-in as root as it will set the root environment settings which " su " by itself won't..

Hi PaulC,

I followed your instruction and it's now ok

Thank you very much!

I also had this problem. I know "su - root" is supposed to source login files, but it wouldn't work on some machines running Solaris 7. I also had the same problem with HP-UX 11. Sometimes it would work, sometimes it wouldn't. Oh well.