It is well known that GNU/Linux is famous for the level of security it can achieve, but I always say that security does not depend on the system you use, but on the one who configures it.
The tip we'll see next is, in my opinion, one of the biggest security violations in GNU/Linux . While it might get us out of one problem, it can land us in another. All thanks to GRUB , which we can edit and wreak havoc on. But we'll see how to protect it later.
To recover the root password , we need to restart the PC. Once at the Grub menu , we select the kernel we're going to use and press the " e " key. My Grub menu displays something like this:
menuentry 'LinuxMint GNU/Linux, with Linux 3.0.0-1-486' --class linuxmint --class gnu-linux --class gnu --class os {
insmod gzio
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root 13b7959d-3c04-45c0-82c5-86bbfff77b65
echo 'Loading Linux 3.0.0-1-486 ...'
linux /boot/vmlinuz-3.0.0-1-486 root=UUID=13b7959d-3c04-45c0-82c5-86bbfff77b65 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.0.0-1-486
And the line that interests us is the one highlighted in bold. We go to the end of that line and put:
init=/bin/sh
At this point, we boot by pressing the keys " Ctrl+X " (the keys may vary depending on the Grub version) . When it finishes loading, we type:
# mount -o remount rw /
And subsequently:
# passwd root
We changed the password, restarted, and that's it... Security breach guaranteed. So I'd better get to work on writing up how to protect Grub . 