I found that even with 'su -' some environment variables were read and some were not (as explained above) and the working directory changed to /root too. The aliases issue had to be overcome by putting those in a .kshrc file referred to by a $ENV variable defined in .profile. Running 'su' carries over the aliases defined in the user directory without changing working directory which I find useful.
Last edited by mechanic; 8th September 2010 at 04:09 PM.
|