Because having a strong password does make a difference, when we’re setting up a password in Ubuntu it checks whether if it is strong enough or not before accepting it into the system by based on few things (the number of characters, whether if it has digits and punctuation marks etc).
So, if you entered a simple or a “weak” password, then the OS might give you an error saying that you have to enter a new, more stronger password and the current one is unacceptable. Recently I wanted to change my password in Ubuntu Linux (using 11.10 Oneiric Ocelot) but while trying to do so, it gave me an error in user account management tool as shown below.
Now the best thing one should do here is to enter a more secure password but I just wanted to enter my old one but while using this utility I couldn’t do it.
Luckily, for the good or the worse the “root” (also known as “sudo”, though “root” is a bit powerful than “sudo” in technical terms) user in GNU/Linux is the ultimate authority thus such restrictions simply aren’t valid to him/her, and you can use the command-line with ‘sudo’ privileges to change the password.
Most GNU/Linux users know this already. But if you’re a newcomer …
All I did was, fire-up my Terminal window and entered the below command which solved the “issue”.
sudo passwd gayan
Replace “gayan’ with the name of the user that you want to change the password, you’ll have to have administrative privileges to do this (obviously) and then follow the on screen details.
Interestingly the user account tool (GUI) that you get after installing Ubuntu won’t let you do it, it is actually possible on the Ubuntu’s installation wizard as you can enter a weak password and the OS will give a warning but it’ll accept it into the system.
Anyway, if you wanted to change your current password into anything you like (even a single character, ahh the wildest dream of every hacker! ;-)) that is one way to do it. Good luck.