LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-11-2007, 05:26 PM   #1
Colosus
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Rep: Reputation: 0
Can't su to root anymore


I've read many threads on LQ with this same subject and spent hours on google trying to find the right answer, so forgive me if the question is easy and I missed something.

I can no longer su to root on my server when connecting through ssh (not sure about local, not in same state). I can SSH to the server as a user, I can SSH to the server as root if I enable it in sshd_config. However, I can not su to root as the user either from using just 'su' or 'su - root'.

I can su to the user from root, but not vice versa. It gives me an 'Incorrect Password' error. Permissions on /etc/passwd and /etc/shadow are fine. The user is in the wheel group even though I have that requirement disabled in pam. I've reset the root password multiple times. I still can't get in. I'm desperate for ideas as I really don't like having my ssh open to root logins.
 
Old 05-11-2007, 05:40 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
See anything in the log files to indicate why you have trouble suing? Normally PAM will dump messages there indicating which tests failed.
 
Old 05-11-2007, 05:41 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm not certain if '/etc/securetty' would restrict su'ing to root with the '-' option, which starts a login shell. Since you can log in as root using ssh, this is probably a dead end. You might want to look at the timestamps for your /etc/security/* files and /etc/sudoers and see if any have been modified after you started having the problem. Also, login as root and change your root password. Maybe doing that will help. However, the pam configs or /etc/sudoers seem to be the most likely culprit.
 
Old 05-11-2007, 05:42 PM   #4
Colosus
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Original Poster
Rep: Reputation: 0
The only things in /var/log/messages are authentication failures from my attempts.
 
Old 05-11-2007, 05:46 PM   #5
Colosus
LQ Newbie
 
Registered: Mar 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal
I'm not certain if '/etc/securetty' would restrict su'ing to root with the '-' option, which starts a login shell. Since you can log in as root using ssh, this is probably a dead end. You might want to look at the timestamps for your /etc/security/* files and /etc/sudoers and see if any have been modified after you started having the problem. Also, login as root and change your root password. Maybe doing that will help. However, the pam configs or /etc/sudoers seem to be the most likely culprit.
I've changed the sudoers file to include my default user, still didn't work. So that file did change after the problem started. I didn't check it before so I don't know that that was an issue.

No changes to /etc/security/* files. I've changed the password on root 3 times. No joy.
 
Old 05-11-2007, 06:15 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I don't know which distro you have. Could there be a different log such as /var/log security?
Open up two ssh sessions. One as a regular user; the other logging in as root.
In the first try to su - to root. In the second, look for files modified in the last 3 minutes: #find /var/log -mtime -3.

Check /etc/password, and the environment variables. I wonder if your shell might be restricted?

Can you use sudo? If visudo isn't locked down, you could try "sudo /bin/bash -l".
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't login as root anymore TranceDude Linux - Software 1 09-18-2005 05:08 PM
Cannot login as root anymore Schmurff Linux - Newbie 6 03-15-2004 11:59 PM
Newbie screwed up and can't log as root anymore chumley115 Linux - Software 3 03-12-2004 02:20 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 04:14 PM
Im NOT Going to Take it Anymore Q. Tews Linux - Software 21 03-30-2003 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:44 PM.

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