Re: Passwordless root shell is offered when boot problem occurs.
Sthu Deus (firstname.lastname@example.org on 2011-11-28 13:47 +0700):
> Once mount error occurs while OS booting, I get root shell - w/o even
> asking for password... How I can change the behavior (to ask for
> password before granting root shell)?
Do you get a message 'root account locked, starting shell?'
fsck errors should drop into a sulogin shell, which asks for the
password. The only way you could get a root shell is if your root
device cannot be found. In that case, there is no way to ask for a
password because there is no password file.
If you must, there might be a way to get what you want by adding files
to the initramfs by dropping a file in /etc/initramfs-tools/hooks/ or
the like. But if you find yourself needing to secure against that, then
you must also set a bootloader password, lock out alternative boot
methods, set a BIOS password and put your machine behind lock and key.
Do you really need that?