Does Manjaro automatically change root password according to sudo user password?

When installing Manjaro, it asks you to create a sudo user. You can check a boxes to make root the same password. My question is, what happens if you later change the password of that sudo user? Does the root password also get changed and always kept in synchronisation? Or does the root password remain as the old password?

Test it and see. :stuck_out_tongue:

If you opt to give root and the sudo user the same password during installation, then the root account is disabled by setting it up without a password — passwordless accounts cannot be logged into. By consequence, changing the sudo user’s password later has no effect on the root account’s password, given that it has none.

If you want to re-enable the root account, you have to give it a valid password — which may or may not be the same as that of the user with sudo access if you do this from the command line, but giving them the same password would not be very wise. You re-enable the root account as follows… :arrow_down:

sudo passwd root

Note that there is actually no such thing as a sudo password. The password required by sudo is either the user’s own password — which is the default behavior — or the root user’s password (if so specified in /etc/sudoers), or the password of the target user (i.e. the root account if no other user is specified and it is set up this way in /etc/sudoers).

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.