In Ubuntu, you can set or change the password of a user account with the passwd command. To change the password of the root user in Ubuntu, run the following command as a sudo user :As a Linux system administrator (sysadmin) you can change password for any users on your server. To change a password on behalf of a user: First sign on or “su” or “sudo” to the “root” account on Linux, run: s udo -i Then type, passwd tom to change a password for tom user By default, Linux passwords never expire for users.The root password is required to login to the root account, but good practice is to never do that. In all likelihood you may never use the root password again. If you select "automatic login" then the user password will not be asked for during boot up.
What is the difference between root password and user password in Linux?
The user password is associated only with the user account, but can likely be used to perform root-level tasks by using sudo. The root password is required to login to the root account, but good practice is to never do that. In all likelihood you may never use the root password again.
How do I set up a root password on Ubuntu?
Type your own password when prompted, and then you will see # prompt. Now you can set up the root user password by typing the following command: There is no root password on Ubuntu and many modern Linux distro. Instead, a regular user account is granted permission to log in as a root user using the sudo command.
How to change the password on Linux?
How to Change the Password on Linux 1 In Linux, you can change the password of a user account with the passwd utility. 2 The encrypted users' passwords, as well as other passwords related information, are stored in the /etc/shadow file. 3 As a regular user, you can only change your own password. See More....
Is root password required to login?
The root password is required to login to the root account, but good practice is to never do that. In all likelihood you may never use the root password again. If you select "automatic login" then the user password will not be asked for during boot up.

Below are two helpful articles on a similar topic 👇
How do I change the password of a group in Linux?How do I change the default username of a user?