Is there any way to prevent others including root account from resetting a user password? I'd like to protect my user account not to be logged in by others so that others can't see the mounted encrypted folder.

  • Do not just undervote. Please give the reason why or hint. – fx-kirin Jun 23 '16 at 3:27
  • i think it's duplicated askubuntu.com/questions/562552/… – Mohamed Slama Jun 23 '16 at 4:15
  • Thanks for the reply. Actually not. I'm just focusing on preventing from changing the password not the encryption and I need a protection from not only user accounts but root. The other questions here seem to only mention from the other user accounts. I'd just like to know whether it is able. – fx-kirin Jun 23 '16 at 4:27

No, you cannot prevent root from changing your password. The root user has full control of the system, and if someone can log in as root, they can change your password. Likewise, if another user has access to sudo, you cannot prevent them from changing your password.

You can protect your data by encrypting your home folder. Users who can use sudo (or log in as root) could still change your password, but would not be able to access your data after changing it.

To secure the computer from root or other users, you need root access yourself. If you own the computer you should consider:

  • disabling the root user (or setting a password only you know)
  • ensuring other users cannot use sudo
  • limiting physical access to the machine when possible
  • encrypting the hard drive (usually requires reinstalling Ubuntu).
  • Protecting from -viewing- sure. But "root" will be able to delete it, no questions asked. – Rinzwind Jun 24 '16 at 7:23
  • That was what I was afraid of. It means root can access my encrypted data while I'm mounting the folder with my account via changing my password and log in as my account. So for now, I'll make only my account have manage root. Thanks. – fx-kirin Jun 24 '16 at 8:48

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.