Hello,
I'm working on a Solaris 9 machine. I found the root's environment variables (say, $PATH, $ORACLE_HOME, big problem) were set differently from the users'. All regular users use C shell now and share the same environment file stored in /usr/local/config/cshrc.default.
Should I just use set/setenv command as root to change root's env variables? Does root use any env setting file as the regular users do? If so, how can I find it and modify it?
Thanks.
Alan
If you are going to use csh as root as well, you can just run 'source /usr/local/config/cshrc.default' to get the environment that is available to other users.
Thanks for the reply. Other than using csh for root, is there other options for root to keep default shell but use same/similar environment variables as the users?
On Solaris 9 do not change the shell for root. The root shell is the static bourne shell. All you need to do is set up the correct .profile in / using the bourne fomat eg:
PATH=/sbin:/usr/sbin
export PATH
I didn't mean to say that the actual login shell is to be changed for root! I meant that once you login as root, you could run csh and source your files as required.
I once had an sysadmin change the shell for root in /etc/passwd, he didn't see that it was /sbin/sh and changed it to /sbin/bash!!! We had to boot the system off a CD and change the shell back.