In the rare cases that a RHEL or CentOS 6 system is prevented from booting by (for instance) an improper shutdown, or a forced fsck-check failure on boot, the console will prompt the user for a root password. How do I disable the password check and drop directly to a root-shell? Unacceptable answers: overriding init on kernel command line (ie, grub)linking / replacing /sbin/sulogin with /sbin/sushell. (This would work, but it would raise red flags with the security framework).booting from some other device
How to permanently disable root-password prompt for recovery mode, RHEL6
centos;rhel;login;console;startup
At several points in rc.sysinit, rcS-emergency will be run when there's a problem requiring administrator intervention, such as:echo $*** An error occurred during the file system check.echo $*** Dropping you to a shell; the system will rebootecho $*** when you leave the shell.str=$(Repair filesystem)PS1=$str \# # ; export PS1[ $SELINUX_STATE = 1 ] && disable_selinuxstart rcS-emergencyHere is the rcS-emergency script:. /etc/sysconfig/initplymouth --hide-splash || true[ -z $EMERGENCY ] && EMERGENCY=/sbin/suloginexec $EMERGENCYIf you add EMERGENCY=/bin/sushell to /etc/sysconfig/init, it'll run sushell, which doesn't ask for a password.