LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to Access to Single User Mode or Emergency Mode (http://www.linuxquestions.org/questions/linux-newbie-8/unable-to-access-to-single-user-mode-or-emergency-mode-908604/)

Pinglu 10-17-2011 10:57 AM

Unable to Access to Single User Mode or Emergency Mode
 
The original problem is that it shows a repeating Authentication Failed message box when I'm at the Centos Login Screen. I can't even type the username. So I decided to boot to single user mode to do a further investigation. But I tried the ways to boot to the single user mode, even the emergency mode through my google search. For example, go to the Kernel line and add the word "single". I'm sure I tried all the ways(in fact not that many ways available), but still everytime it will go to the GUI login screen and shows that Authentication Failed message box.

Can anyone help me out here? Thank you.

macemoneta 10-17-2011 11:15 AM

Try this sequence:

- Boot the CentOS LiveCD,
- mount the system root on /mnt,
- chroot to /mnt and
- reset the root password.
- Reboot.

Pinglu 10-17-2011 01:08 PM

Quote:

Originally Posted by macemoneta (Post 4500607)
Try this sequence:

- Boot the CentOS LiveCD,
- mount the system root on /mnt,
- chroot to /mnt and
- reset the root password.
- Reboot.

Thanks for the reply, can I ask you how to mount the system root on /mnt, and if I do so, will anything in the file system be changed, cause I don't want to mess up anything in the system. Thank you.

macemoneta 10-17-2011 01:25 PM

You can mount the root on a default CentOS installation and run the above with:
Code:

su -
mount /dev/mapper/*lv_root /mnt
chroot /mnt
passwd root
exit

Yes, the filesystem will be changed to update the password, since you can't otherwise authenticate.

Update: You can update any account password this way. For example:
Code:

passwd someuser


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