Problem with su -
suvayu ali
fatkasuvayu+linux at gmail.com
Tue Mar 6 12:03:25 UTC 2012
On Tue, Mar 6, 2012 at 12:30, Ed Greshko <Ed.Greshko at greshko.com> wrote:
>
> You said you have this....
>
> bash-4.2# ls /etc/bashrc*
> /etc/bashrc /etc/bashrc~ /etc/bashrc.wrkng
>
> I don't know what /etc/bashrc~ since I don't have one on my system.
> Maybe move that to /tmp or something and try again?
>
Those are backup files from some editor, most likely emacs. It suggests
the OP has edited the /etc/bashrc at some point in the past.
> I also note that "ll" doesn't seem to work. That is also troublesome
> since it would seem to indicate a problem with sourcing the files in
> /etc/profile.d. You do have a /etc/profile file?
>
> Another thing to try....
>
> Move /etc/bashrc.wrkng back to /etc/bashrc and then "su -". You'll have
> the "bad" prompt. But then type ". /etc/bashrc" and see if there are
> any error messages.
I think all these problems are still related to the SELinux issue the OP
had earlier. Probably the relabel did not work completely. I would
suggest the OP to take a look at the permissions and the SELinux context
of the profile directories and rc files.
This is how it should be:
$ ls -lhd /etc/bash* /etc/profile*
-rw-r--r--. 1 root root 57K Sep 4 2011 /etc/bash_completion
drwxr-xr-x. 2 root root 4.0K Feb 28 14:30 /etc/bash_completion.d
-rw-r--r--. 1 root root 2.6K Aug 16 2011 /etc/bashrc
-rw-r--r--. 1 root root 1.8K Aug 16 2011 /etc/profile
drwxr-xr-x. 2 root root 4.0K Feb 27 10:09 /etc/profile.d
$ ls -Zd /etc/bash* /etc/profile*
-rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/bash_completion
drwxr-xr-x. root root system_u:object_r:etc_t:s0 /etc/bash_completion.d
-rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/bashrc
-rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/profile
drwxr-xr-x. root root system_u:object_r:bin_t:s0 /etc/profile.d
# ls -lh /root/.bash*
-rw-------. 1 root root 32K Mar 4 22:55 /root/.bash_history
-rw-r--r--. 1 root root 24 Aug 10 2011 /root/.bash_logout
-rw-r--r--. 1 root root 404 Feb 19 18:11 /root/.bash_profile
-rw-r--r--. 1 root root 2.1K Mar 4 22:57 /root/.bashrc
# ls -Z /root/.bash*
-rw-------. root root system_u:object_r:admin_home_t:s0 /root/.bash_history
-rw-r--r--. root root system_u:object_r:admin_home_t:s0 /root/.bash_logout
-rw-r--r--. root root system_u:object_r:admin_home_t:s0 /root/.bash_profile
-rw-r--r--. root root system_u:object_r:admin_home_t:s0 /root/.bashrc
GL
--
Suvayu
Open source is the future. It sets us free.
More information about the users
mailing list