Thread: Cannot Login
View Single Post

  #4 (permalink)  
Old 04-30-2008, 03:31 AM
root root is offline
Administrator
User
 
Join Date: Apr 2007
Posts: 10
Rep Power: 10
root has disabled reputation
Default

You need to use CentOS cd only to boot into emergency mode. You can access / in a single user mode. To fix this problem at Grub boot screen:
  1. Select the kernel
  2. Press the e key to edit the entry
  3. Select second line (the line starting with the word kernel)
  4. Press the e key to edit kernel entry so that you can append single user mode
  5. Append the letter S (or word Single) to the end of the (kernel) line
  6. Press ENTER key
  7. Now press the b key to boot the Linux kernel into single user mode
You need to mount at least / and other partitions:
Code:
mount -t proc proc /proc
mount -o remount,rw /
Now edit file /etc/ssh/sshd_config and allow root user. If you forgotten root password, just set new password, enter:
Code:
passwd root
We have plenty of docs about grub and booting into a single user mode:

Linux: Grub Boot into single user mode



Linux reset forgotten root password


How to: Recovering Linux grub boot loader password
Reply With Quote