Problem with su -

jdow jdow at earthlink.net
Tue Mar 6 15:27:36 UTC 2012


On 2012/03/06 01:58, Bob Goodwin wrote:
> On 06/03/12 01:09, Ed Greshko wrote:
>> I wonder if it is even being sourced, based on the manner
>> of other problems you've been reporting as of late.
>
> The other recent problems you refer to have been common to both
> computers, this one is a difference between them ... But they
> are different computers. Box9 has three drives, Box6 only one
> connected, etc. But I doubt those differences are the problem.

He'll have to trace it out. Normally "su" runs "/root/.bashrc" followed
by "/etc/bashrc". This strongly suggests his /root/.bashrc file has been
corrupted or his /etc/bashrc has some exotic lack of privileges. (Being
reckless with chmod can do strange things to a system.) It also means he
will not have the path setup, among other things, that he expects.

Normally "su -l" runs "/etc/profile" followed by "/root/.bash_profile"
followed by "/root/.bashrc" and lastly "/etc/bashrc". I suspect he will
see the same defect if he uses "su -" to get a login shell. It would be
worth the experiment.

Then he needs to look at the ROOT account's .bashrc file to see what has
changed. It should have this in it:

# Source global definitions
if [ -f /etc/bashrc ]; then
         . /etc/bashrc
fi

If it doesn't then that needs to get fixed.

{^_^}


More information about the users mailing list