- Published on
How to Change Passwords in Linux
- Authors
- Name
- hwahyeon
In Linux, you can change your own password or another user's password using the passwd
command.
To change your own password:
passwd
- You’ll be asked to enter your current password.
- Then you’ll be prompted to enter a new password twice.
To change another user's password as an administrator:
sudo passwd username
- You must have sudo privileges.
- Useful for system administrators managing multiple users.
passwd username
without sudo
About passwd username
- This only works if you are logged in as the root user.
- Regular users cannot change other users' passwords with this.