@sumit_47
Linux Oct 16, 2026

changing both the root password and my user password on ubuntu

Set this machine up ages ago with a weak password I now regret. I want to change my own login password and also set a proper root password. Which commands do I need, and does changing one affect sudo?
1

Leave A Reply

Log in to post an answer.

1 Answer

irabyte Oct 20, 2026
sumit_47
your own password: passwd root: sudo passwd root sudo asks for YOUR password, not root's, so changing root has no effect on sudo at all. and on ubuntu root is locked by default, so setting a root password actually unlocks a login that wasn't usable before. unless you specifically need to log in as root, I'd just change your own and leave root locked.