Ubuntu – Are user files still private when two sudo users exist in Ubuntu

permissionssudo

I am sharing my personal Ubuntu PC with one of my colleagues.

I created another user with a different password (he knows of course) and added it to the sudoer list.

Given that there are two sudo users in a single Ubuntu system:

  • Are the private files (specified by owners and permissions) of any of these users still private?

  • Can I modify my colleague's files via sudo command, even sudo su, or vice versa?

Best Answer

If your colleague is in the sudoers list he is root as much as you if he wants it (and he can impersonate you too), and then he can see everything.

This is the worst setup you can have if you want user privacy. You should definitively read into how user management on Linux works. Here are a few articles yo can start with:

And even then if someone has physical access to the machine in question, there is no privacy, he could drop at boot into a root shell and see everything no matter what, and if this would be password protected he could still use an USB stick and go in on this way.

So best thing in that case is proper user management, password for root, and encrypted drive and/or encrypted home directories.

Related Question