2012年2月8日 星期三

[fedora 12] Single user mode && Can't su root && SSH can't login


Fedora 12



Single user mode



You can do the following:



1) Reboot the machine.



1-1) For fedora boot list



After BIOS boot, press DELETE button for a while.





2) You will see a list of various kernels you can boot into

Fedora Core (2.6.32-1.1369_FC4smp)

Fedora Core (2.6.11-1.1369_FC4smp)



3) Press "e" to edit the boot up arguments



4) And add 1 at the end of quiet.

kernel /vmlinuz-2.6.11-1.1369_FC4smp ro root=LABEL=/1 rhgb quiet 1 (1 = single user mode)



Can't su root



5) chmod u+s /bin/su



6) Test su root (su -)



If su root is OK then fix OK



SSH can't login 



Error message : Read from socket failed: Connection reset by peer



7) fix ssh can't login



cd /etc/ssh



copy following command and paste



chmod 600 sshd_config ssh_host_dsa_key

chmod 600 ssh_host_key ssh_host_rsa_key

chmod 620 moduli

chmod 644 ssh_config ssh_host_dsa_key.pub

chmod 644 ssh_host_rsa_key



8) Reboot machine





0 - Halt

1 - Single-user mode

2 - Not used (user-definable)

3 - Full multi-user mode (no GUI interface)

4 - Not used (user-definable)

5 - Full multiuser mode (with GUI interface)

6 - Reboot



 



Reference:


0 意見:

張貼留言