Disable Single User Mode on Centos 6.x

Single user mode in Linux offers the opportunity for anyone with physical access to a system to reset the root password and have full control. That's a pretty big security hole. As usual with Linux, fixing it is a pretty simple process.

Here's how to have CentOS require the root password for single user mode. The obvious caveat is that if you loose said password, you're locked out:

vi /etc/sysconfig/init

Press 'a' to enter edit mode in vi. Scroll to the bottom of the file and change:

SINGLE=/sbin/sushell

to

SINGLE=/sbin/sulogin

Press Escape and then :wq

Done.

Posted by

Share: