Changing a Linux password is very easy if you are a beginner or even a professional having a background in Linux for years. However, every step you follow must be followed precisely in order for you to change or reset your password. Furthermore, you can also change someone else’s password on Linux, and we will discuss exactly how you can do so.
NOTE: Are you about to change your Linux password? Don’t make the mistake that everyone does—have a Password123 or BillyJone2000 as your password. Can’t create a 12-character-long password that hackers will never be able to crack? Let FastestPass create a mix of characters for you and save your advanced passwords without you having to worry about their security!
Whether you are a beginner or a seasoned user, learn how to change the Linux password for yourself as well as any other user on the system in this blog. Furthermore, learn how you can enhance your passwords and keep them as secure as possible.
What is Linux?
As a newbie, you might not know what Linux is. But if you have heard about it, then you are already one step ahead of the vast majority of newbies who don’t know about it.
Linux is a free and open-source operating system kernel, similar to Unix. Its purpose is to serve as a foundation for distros that are used in desktops, servers, etc.
In this guide, you will learn about changing passwords on all sorts of Linux, whether you are a beginner or a trained pro.
How to change your password in Linux
Let’s start with how to change the Linux password as a current user logged in (you). It’s a very simple process. Follow these instructions:
- Open the Terminal Window.
- Just type passwd.
- Press the Enter key.
- When prompted, enter your new password and confirm it by re-entering it.
- When you’re typing in the password, it won’t appear on the Terminal window for security reasons.
- The Terminal window will confirm that your password is updated successfully.
How to change another user’s password on Linux
Now, let’s move on to how you can change another user’s password in Linux. However, to do this step, you need to be logged in as a root user. Here’s what you need to do:
- Open the Terminal window.
- Type the su – command
- Hit Enter
- As a root user, type in the passwd command and the username of the user whose password you intend to change with the command sudo passwd username
- Hit enter and confirm your password upon re-entering it.
This was how to change the root password in Linux. If you are not a root user, you’ll have to follow these steps to change another user’s password on Linux:
- To update a Linux password without root user access, you can follow emergency methods that include single-user mode.
- Another process that you can follow is with the Key usermod -p for a hashed password injection. This is a technical workaround, which will also prompt a security warning.
How to force a password reset on Linux
There are certain events where the only option to change a password is to force-reset a root password on Linux. If someone’s account has been compromised, then this step comes into play.
- Open the Terminal window.
- Type the su – or sudo -i command and hit Enter.
- You must be a root user for this step: type the passwd command.
- Now, enter the username whose password you are to change.
- The password reset will start once you hit the command passwd -e username.
- Once the user logs in to Linux the next time, they will be prompted to reset their password then and there.
Troubleshooting Common Linux Password Errors
While changing a password on Linux, before or after, you can bump into some technical issues; these errors can be resolved with proper troubleshooting. Here’s what you are most likely to encounter while updating a password in Linux.
The new password is too simple
If your new password is too simple, it means it’s easier for the hacker to log into your system and corrupt your files. To fix this issue, adjust the pwquality.conf rules on Linux.
Moreover, you can choose a better password for your Linux. FastestPass generates strong passwords for you—a combination of all characters for a secure password.
The Password change failed
Have you bumped into the most common problem that a lot of other users also encounter? If your password change has failed midway, don’t panic. Instead, test the password hash compatibility on Linux.
Ensure your password security with FastestPass
Now, when you have updated your Linux password or reset it to one that it would take a million years to even think about breaching, what about safeguarding your password?
Today, you don’t have to write your password down on a piece of paper, fold it in a pen, tie it to a stone, and bury it under a plant at your place. No, things are very simple now.
You might already have been introduced to a browser saved password (yes, when the browser forces you, in a friendly way, to save your password to it), but what’s better is a dedicated password manager.
FastestPass is a dedicated password manager that not only generates an advanced-level password for you, but it also helps you save all your passwords, protected in an AES-256-bit vault, synced across all your devices, protected by a master password. Think about this, instead of remembering tens or hundreds of your passwords, now, you just have to remember one password for all your passwords! Check out pricing and packages yourself, and install the application on all your devices.
Conclusion
In this guide, we have made sure of the practices you need to follow in order to change your Linux password. Moreover, you also saw how you can change a Linux password of another user through your interface. Not only this, how you can reset your password with or without root, and finally, common errors and how you can troubleshoot them and get them fixed without panicking as well.
When it comes to online security, keeping your information intact is a necessity. Changing your ordinary passwords to advanced passwords is a must. If you can not do so, let FastestPass generate long and advanced passwords for your applications. Moreover, you can keep all your passwords safe and sound within FastestPass, synced across all your devices!
Generate passkeys, store them in vaults, and safeguard sensitive data! Receive the latest updates, trending posts, new package deals,and more from FastestPass via our email newsletter.
By subscribing to FastestPass, you agree to receive the latest cybersecurity news, tips, product updates, and admin resources. You also agree to FastestPass' Privacy Policy.
Secure and Create Stronger Passwords Now!
Subscribe to Our Newsletter