I am trying to understand this situation... Today I got a problem with de sudoers file since I modified and got problem whit this modification. So the only way to solve the problem was to modify the file using root in Recovery Mode.

And there is where the problem start.... no password was asked at all... so, just by choosing 2 options (Recovery Mode in Grub and Root in Recovery Mode), I've got access to all my system and all his files as a root.

This is very dangerous ! Anyone could easily erase important files or simply broke the entire system without any password/password/....

Is there any official communicate by Canonical about this ? It is simply an old forget feature or just something that no one want to change just because they don't want to ?


It's not a bug, it's a feature. Anyone with physical access to the machine can get your data and/ or modify it unless your partitions are encrypted.

Consider this case: you can boot a Live CD and be able to read and modify data without issues.

Another one: someone could open the case, take the disk out of it and plug it in another machine (USB dock, eSATA, etc.). Then it's again easy to read and modify the data.

If you want to disable creation of the recovery entry, edit /etc/default/grub, uncomment the GRUB_DISABLE_RECOVERY="true" line by removing the leading # character and run sudo update-grub. However, this does not make it impossible to boot into recovery mode since you can still edit the boot options by pressing E on an entry and add single to the kernel line.

The only way to protect against such an attack is by encrypting your whole disk using LUKS. I strongly recommend to do that especially for mobile devices such as a notebook. See How to truly secure a hard-drive?

  • Yes but it is diferent... I Understand the Live CD and others but I don't really understand this one. For a user that don't understand anything to security and doesn't even think about it until something goes wrong, he won't even consider to encrypt his directory or disable recovery.... So I think the better way is to, when the installation is done, make the root password the same as the principal user's password if (and only if) the user want it to be so... Am I wrong whit this ?... – aliasbody Oct 17 '11 at 21:27
  • Yes you're wrong. The root account does not have a password because you can simply not log in with it in the the non-single modus (See also askubuntu.com/q/16178/6969). In the past, you could password-protect the root user in single mode by changing the password for it: sudo passwd root. I'm not sure if that still works though. – Lekensteyn Oct 17 '11 at 22:07
  • I'm sorry, but I is still dangerous .... I think Ubuntu should find a way to protect "newbie" users more than that... just saying. I'm not saying that this feature is bad at all (since is what saves me of my stupid error with sudoers), but for me the question remains... the access is to simple and easy even for people who never used the linux terminal before. In my humble opinion, the Recovery Mode must be reviewed and adapted to new users and new situations. To make it hard to new users to break the system (which is not the case when using USC), and easy for Admin to configure the machine – aliasbody Oct 17 '11 at 22:11
  • @aliasbody: so you want Canonical to remove the recovery entry by default so the user does not accidentally boot into it? And make users lock themself out (just like you did) without having a direct way to correct it? I doubt if it's possible to make a single boot option / button that fixes all issues for you without knowing the background situation. – Lekensteyn Oct 17 '11 at 22:15
  • 1
    Recovery mode boots into "Single User Mode", an idea that started with Unix. It's a simpler system than you usually see (recovery modes should be simple and minimal - the more you have to start before you can fix things, the higher the chance that something won't start and you won't be able to fix it) - No X windows, no networking, nobody but UID 0 (root). Linux is a set of powerful tools. You can do ANYTHING, including shooting yourself in the foot. If your users have the habit of booting into recovery mode and removing important files, CHANGE USERS! Put a password on boot. – waltinator Oct 18 '11 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.