LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-01-2005, 06:55 PM   #1
twysm
Member
 
Registered: Jun 2004
Location: Lima - Perú
Distribution: Gentoo 2007.0
Posts: 78

Rep: Reputation: 15
Can't login as root with 'su'


Hi, I've made some stupid thing trying to install cPanel on my PC (just to try it out), I know this was really stupid . Finally it was installed BUT it didn't work, so I uninstalled it, but then i noticed i had 2 more shells in my /etc/shells file and that my /bin/su program was root:wheel owned AND the worst thing is that now I can't login as root using 'su'. Ive corrected the permissions and ownership, and also the /etc/shells file, but noting ...

Please anyone here can help me out?? THANKS!
 
Old 12-02-2005, 08:25 AM   #2
spookt
LQ Newbie
 
Registered: Dec 2003
Location: North East UK
Distribution: Red Hat / Fedora
Posts: 11

Rep: Reputation: 0
What happens when you try to 'su' ?

If the su binary has been replaced or corrupted just reinstall the coreutils package from either the original CD or the updates branch of one of the fedora mirrors.

To see if su has been changed try rpm -V coreutils. If you get no output back then no changes have been made from the initial install. If you get a line like

Code:
root@gryffindor:/home/paul: # rpm -V coreutils
SM?....T    /bin/su
Then it has changed. The possible output is something like SM?DLUGTC. Basically if you get a ? or 5 as the third charcater, the content or sum of the file is different from what was installed with the rpm.

To reinstall the package you may have to do something like rpm -ivh --replacepkgs coreutils.whatever.rpm to force rpm to reinstall an existing package.

Hope that helps.

PS - I notice that you say you can't log in with su. Does that mean that you cannot su to root when logged in as a normal user or you cannot log in as root ? If it's the second (and I don't know why a corrupted su binary would cause that) then you'd have to do the above from rescue mode. Remember to use the --root /mnt/sysimage on rpm if you don't chroot there first.
 
Old 12-02-2005, 07:19 PM   #3
twysm
Member
 
Registered: Jun 2004
Location: Lima - Perú
Distribution: Gentoo 2007.0
Posts: 78

Original Poster
Rep: Reputation: 15
Hello spootk, thanks for your answer. I already replaced the 'su' binary with the one i have in the CDs, but NOTHING, the binary was not corrupted. What it happends is that when I login as a normal user then i cant switch to root and i always get a "incorrect password" error message(i use the correct passwd..., just in case), but root CAN switch to any user, thanks for you time!
 
Old 12-02-2005, 07:29 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you can log in as root, but can't su to root, there are a couple things that you might want to look at:
1) Are you still a member of the wheel group.
2) Are members of the wheel group still allowed to su to root according to the /etc/sudoers file (edit using visudo).

While looking at the second, check whether the password was changed for sudo. Sometimes, it is the users own password.

The implementation of the the sudoers policy may be handled by PAM, and so that is something else that may of been altered.

Last edited by jschiwal; 12-02-2005 at 08:16 PM.
 
Old 12-04-2005, 04:34 PM   #5
spookt
LQ Newbie
 
Registered: Dec 2003
Location: North East UK
Distribution: Red Hat / Fedora
Posts: 11

Rep: Reputation: 0
Also check /var/log/messages and /var/log/secure after an su attempt to see if there are any errors.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
root login via kde login screen linuxmandrake Linux - Newbie 2 10-09-2005 11:30 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration