Root access to Ubuntu when you have a access to sudoer’s desktop, but not to his root password

rootSecurity

I did the following steps.

  1. mv ~/.local/share/keyrings/login.keyring ~/.local/share/keyrings/login.keyring.bakup
  2. Reboot computer
  3. Choose advanced options -> recovery -> boot as root

This got me to root terminal. Password was not required.

Now I can do whatever I want, e.i. format the disk. Or I can do better. I've created a new unwanted_user and added it to sudoers group. Moved the keyring from login.keyring.bakup to login.keyring, while keeping permissions. Rebooted Ubuntu one more time. I could have installed SSH-server, connect to this computer from a remote location, do my stuff, cleanup logs and delete the unwanted_user.

Sure, an admin in a government security office would lock his computer, notice that the computer is now at a login screen, check logs, have surveillance cameras, etc.

But what if I am a layman, hiding my private documents in a folder, owned by root? Anyone familiar with Linux can repeat these steps. Is this a feature or a bug. Can I disable this unwanted keyring service? I've uninstalled the seahorse, but the same steps worked again.

Best Answer

This got me to root terminal. Password was not required.

...

But what if I am a layman, hiding my private documents in a folder, owned by root? Anyone familiar with Linux can repeat these steps. Is this a feature or a bug.

If you have physical access to a computer you can always find a way to access (and change) unencrypted data on it. This isn't really related to the login keyring, once you boot in the single user mode, you are root and you can do whatever you want, you don't need to do anything with the login keyring. You can add password protection to GRUB to make sure your system can't be booted in a single user mode, but simply booting from a Live USB will give you the same full access.

If you want to hide your files, don't hide them in a folder owned by root, encrypt your disk and if other people have access to your computer, never leave it without locking the screen or shutting it down.

Related Question