Ubuntu – Simple password problem

password

Why is a password like "12many" considered "fair" when installing ubuntu 13.04 but too short and too simple when changing it?

I really have nothing to protect- I have locks on my doors and nothing valuable on my computer. I think I understand the risks of a weak but memorable password and am willing to take the associated risks. Why does Ubuntu want me to use 4Kl0Ijm7NNtvD4502Kq for a password? Then will not allow me to control and use my machine as I see fit?

This is why I want to use Linux- so I can use it my way. I have to reinstall Ubuntu because I wanted to change my password and use a simple easy to remember password.

I am really inconvenienced.

Best Answer

An installation of Ubuntu requires a minimum password length of 8 characters. (This was changed a few years ago, but I think they kept the installer with a shorter password length to make it easier to setup a user during installation).

Nevertheless, it is very easy to change the default password length...

With superuser or root privileges, you need to edit a file called /etc/pam.d/common-password.

GUI Method

In the Unity dash, search for and launch "Terminal." In the terminal, type sudo gedit /etc/pam.d/common-password. Enter your password, and a text editor will appear. Find the line that says "pam_unix.so obscure sha512", add a single space at the end of this line, and type "min=6" (without the quotes). Then save your file and exit the text editor. (This will allow you to use passwords that are 6 characters long. Of course, you could use a different password length number for "min=", if you like).

Simple Command Line Method

To make this easy, you can do all of this automatically by typing the following two lines into your terminal. In the Unity dash, search for and launch "Terminal." In the terminal, type (and enter your password when prompted):

sudo cp -v /etc/pam.d/common-password /etc/pam.d/common-password.original

sudo sed -i "s|pam_unix.so obscure sha512|pam_unix.so min=6 sha512|g" /etc/pam.d/common-password

(Note that the first line above simply makes a copy of your original common-password file, so you can revert to it if you need to).

A bit off topic, but regarding your other point about convenience, I find there are many, many conveniences with Linux, but there are always some things that do no come pre-configured "your way" out-of-the-box. For example, someone running a business with secure data may appreciate the longer password length restriction.

I also find that if something is not convenient for you out-of-the-box, then it can be easily changed to your liking. And the best part is, you don't always have to know what to do, because there lots of people out there willing to help!

Related Question