The Credential Management Vector
Maintaining strong security on an Ubuntu Linux server requires regular credential rotation. Whether you are enforcing a strict 90-day password policy for your development team or responding to a potential security breach, system administrators must be able to rapidly update authentication credentials. Because server environments operate entirely without graphical control panels, this process must be executed precisely via the command-line interface.
How to Change Your User Password
The standard, highly secure utility for updating authentication credentials in Linux is the passwd command.
1. Open your terminal application or connect to your server via SSH.
2. If you are changing the password for the account you are currently logged into, simply type:
passwd
3. The terminal will first prompt you to enter your Current password. Type it (the characters will remain invisible) and press Enter.
4. It will then prompt you to enter a New password. Type it and press Enter.
5. Finally, it will ask you to Retype new password to confirm.
6. If you are an administrator and need to forcefully change the password of a completely different user (e.g., johndoe), use the sudo command:
sudo passwd johndoe
7. When using sudo, you bypass the requirement to know the user’s current password. You will simply be prompted to enter and confirm the new credential.
The system will immediately update the encrypted hash in the /etc/shadow file, and the new password will be required for all future logins.