Contents
Both Linux and UNIX-like operating systems use the passwd command to change user password.
Changing user passwords on Linux
- First sign on or “su” or “sudo” to the “root” account on Linux, run: sudo -i.
- Then type, passwd tom to change a password for tom user.
- The system will prompt you to enter a password twice.
How do I find my root password in Linux?
Method 1 With the Current Root Password
- Open a terminal window.
- Type su at the command prompt, and press ↵ Enter .
- Type the current root password, then press ↵ Enter .
- Type passwd and press ↵ Enter .
- Type a new password and press ↵ Enter .
- Retype the new password and press ↵ Enter .
- Type exit and press ↵ Enter .
How do I change a user password in Ubuntu?
How to Change sudo Password in Ubuntu
- Step 1: Open the Ubuntu command line. We need to use the Ubuntu command line, the Terminal, in order to change the sudo password.
- Step 2: Log in as root user. Only a root user can change his/her own password.
- Step 3: Change the sudo password through the passwd command.
- Step 4: Exit the root login and then the Terminal.