How to Change User Password in Linux
To change a user password using the passwd
command, follow these steps:
Step 1: Open a terminal on your Linux system.
Step 2: Type the following command and press Enter:
passwd
- If you are not the root user, you will be prompted to enter your current password to proceed.
- You will then be prompted to enter the new password. Type the new password and press Enter.
- Retype the new password when prompted to confirm.
- The password for the specified user account is now changed.
Note: Linux does not display any characters on the screen while you type the password for security reasons.
How to Change User Password in Linux | passwd Command
Securing user accounts is a fundamental aspect of maintaining a robust and secure Linux system. One essential task is changing user passwords regularly to prevent unauthorized access. The passwd
command in Linux provides a straightforward and effective way to modify user passwords. This article will guide you through the process of changing user passwords using the passwd
command, offering insights into its various options and best practices.
Table of Content
- Understanding the `passwd` Command
- Basic Syntax of `passwd` in Linux
- Options Available in `passwd` Command in Linux
- 1. How to Change User Password in Linux
- 2. How to Change Another User’s Password in Linux
- 3. How to Change the User Password Forcely
- 4. How to Lock and Unlock User Account in Linux
- 5. How to Set Password Expiry
- Processing in passwd command: