When switching to init 1 (single user mode), system automaticly logs in as
root. There is no password protection at this level. This is a security
problem especially with console access and Ctrl+Alt+Del enabled: typing
"LILO: linux 1" will give full root access.
So will, among other things, 'linux init=/bin/bash'. Without
disabling command-line arguments completely in LILO, there's
no point in making single user-mode ask for a password.
There is actually a fairly simple fix for this problem, which I have put in
every Linux installation I've done:
1. Run the following command:
chmod 0600 /etc/lilo.conf
2. Put the following two lines at the top of /etc/lilo.conf (at least, in
the global section thereof):
Replace PASSWORD with whatever password you require, in plaintext.
Note that whitespace is NOT permitted in the password.
3. Make sure that the default runlevel in /etc/inittab is NOT level 1.
4. Run lilo to install those changes.
Following the above, anybody wishing to add ANY parameters to the command line
will need to type in the specified password before LILO will permit their use.
The password has to be in plaintext here for some reason, hence the requirement
to set mode 0600 on /etc/lilo.conf first.
Personally, I'd like to see this as the default in RedHat. Any chance of that?