How to change a user password in Ubuntu?
To change a user’s password in Ubuntu, follow these steps:
- Open the terminal by pressing the shortcut Ctrl + Alt + T.
- Enter the following command to change the user password:
sudo passwd 用户名
Replace the username with the username for which you want to change the password, for example:
sudo passwd bob
- After pressing the Enter key, the system will prompt you to enter a new password. Once you have entered the new password, press Enter to confirm.
- The system will ask you to confirm your password again. After entering the new password once more, press the Enter key to confirm.
- After successfully changing your password, the system will display a message confirming that the password has been updated.
You have now successfully changed the user’s password. You can use the new password to log in to the user’s account.