Re: Problem with su -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/03/12 10:31, jdow wrote:
On 2012/03/06 04:45, Bob Goodwin wrote:
On 06/03/12 07:03, suvayu ali wrote:
On Tue, Mar 6, 2012 at 12:30, Ed Greshko<Ed.Greshko@xxxxxxxxxxx> 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

[root@box9 ~]# 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 3 10:35 /etc/bash_completion.d
-rw-r--r--. 1 root root 2.6K Mar 6 07:10 /etc/bashrc
-rw-r--r--. 1 root root 2.6K Aug 16 2011 /etc/bashrc~
-rw-r--r--. 1 root root 2.6K Mar 6 05:30 /etc/bashrc.wrkng
-rw-r--r--. 1 root root 1.8K Aug 16 2011 /etc/profile
drwxr-xr-x. 2 root root 4.0K Mar 3 12: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

[root@box9 ~]# 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 unconfined_u:object_r:etc_t:s0 /etc/bashrc
-rw-r--r--. root root system_u:object_r:etc_t:s0 /etc/bashrc~
-rw-r--r--. root root unconfined_u:object_r:etc_t:s0 /etc/bashrc.wrkng
-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

[root@box9 ~]# ls -lh /root/.bash*
-rw-------. 1 root root 927 Mar 6 07:13 /root/.bash_history



# 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

[root@box9 ~]# ls -Z /root/.bash*
-rw-------. root root system_u:object_r:admin_home_t:s0
/root/.bash_history



GL


All I've done here is listed the files you suggested, not sure what
the results mean ...

Bob

You have cleared out your root directory is that that means. Whatever was
in there is lost. You played with the "rm" command as root and were
careless about the command formatting. "Oops".

       I did not issue any "rm" as root. That would be unthinkable, I
       prefer to think not anyway. Something went wrong involving the
       yum install/removal process, perhaps triggered by something I
       did, but not a simple "rm" from the command line.


Repair will be tedious at best - reinstall at worst depending on your level
of expertise.

       Level of expertise, User/amateur!


{^_^}

       I have another used computer ordered, should have it in a day or
       two. Plan on replacing box9 [with the perhaps damaged root
       directory] and using it to replace my NFS server. It will get a
       new SL install.

       The "new" box9 will get an F16/64 install. Presently /home is on
       a drive by itself so I should be able to move that to the "new"
       computer and keep its' contents, hopefully much of my
       configuration will go with it.

       Anyway, repairing things until then will be only a learning
       exercise, however I'm not aware of any other problems yet.

       Bob

-- http://www.qrz.com/db/W2BOD

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux