Guest wahro02 Posted March 4, 2010 Report Share Posted March 4, 2010 Morning folks - We are running Mandrake MNF 8.2. Recently, the root password expired and was changed at the console. After changing it, it no longer worked, even the previous password. I could not boot into single-user mode, as it asked for a "maintenance password". I had to boot with a Linux live CD and edit /etc/passwd and /etc/shadow to blank out the root password. This allowed me to enter single-user mode, as it no longer asked me for a maintenance password. At the prompt, I did passwd to reset the root password. Rebooted. The password still did not work when trying to log in as root at the console command line (no GUI). However - the new password does work as the maintenance password and also works when I issue the reboot command as a user. It does not work when I try to sudo though. In summary: - root password works for single user maintenance mode - root password works when I issue reboot command as a user - root password does not work when I try to log in as root at the console Any thoughts on what the problem might be? Regards - Robert Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted March 4, 2010 Report Share Posted March 4, 2010 What's your pam configuration? Changed this recently attempting to authentication through other sources than passwd? Incidently, you don't need to comment root out of /etc/passwd and /etc/shadow. Once you've booted the live cd, you just simply chroot into your Mandrake install and then use passwd in the normal way for resetting the root password. Quote Link to comment Share on other sites More sharing options...
Guest wahro02 Posted March 4, 2010 Report Share Posted March 4, 2010 No changes to anything in pam.d. Everything in it is 5+ years old. My fault: I didn't comment out root from /etc/passwd and /etc/shadow. I just deleted anything in the second field; i.e. the entry now looks like root::(whatever else follows) in both files. I'll try the live CD and chroot when I bring the firewall down again. Thanks much for the reply. Quote Link to comment Share on other sites More sharing options...
Guest wahro02 Posted March 11, 2010 Report Share Posted March 11, 2010 No luck. I did the following: - booted from a Puppy Linux live CD - opened a terminal session - mounted the appropriate drive of the host - chroot /mnt/sda1 /bin/bash - passwd I received the "all auth tokens updated" message and both /etc/passwd and /etc/shadow had current timestamps. Still the same situation though: the root password works to enter single mode and to reboot while logged in with a different account, but not for logging in root directly, and not for sudo (if that helps). Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted March 11, 2010 Report Share Posted March 11, 2010 Can you tell me what the contents of your /etc/securetty file is? This is how mine looks: [ian@esprit ~]$ cat /etc/securetty tty0 tty1 tty2 tty3 tty4 tty5 tty6 vc/1 vc/2 vc/3 vc/4 vc/5 vc/6 maybe yours is empty and why cannot login. Just a guess, because I can't figure out why. Quote Link to comment Share on other sites More sharing options...
Guest wahro02 Posted March 12, 2010 Report Share Posted March 12, 2010 (edited) This looks interestingly promising: # ls -lrt securetty -rw-r----- 1 root root 0 Mar 10 2004 securetty Nothing in it and never was? Googling for Mandrake mnf and securetty, I found a similar issue in these forums: Mandrake MNF - Spoofing MAC address - How? I can login using a secondary account and su works, so I guess I'm ok. I think I tried sudo before... Thanks for the help *More* Per the link above, it looks like the "PermitRootLogin without-password" entry in /etc/ssh/sshd_config plays some part in this also. Edited March 12, 2010 by wahro02 Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted March 13, 2010 Report Share Posted March 13, 2010 I don't think so, SSH won't stop you getting into a console window, only via connection with SSH. The empty file is why. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.