2

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.

guntbert
  • 13,134
user181580
  • 21
  • 1
  • 2
  • I must admit feeling the same when I installed Ubuntu first, however I have been brainwashed into acceptance! ;) – Simon Aug 05 '13 at 17:44
  • Usually, when you have used a password before, and when you try using the same, the system recognizes it and doesn't (usually) allow you to enter the same. Similar thing happened to me, but I just added a couple more words that actually made sense :P – Kitizl Sep 30 '13 at 14:04
  • A really simple method is described here: http://askubuntu.com/questions/180402/how-to-set-a-short-password-on-ubuntu – Dmitry Wojciechowski Mar 26 '15 at 17:16

1 Answers1

1

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!

guntbert
  • 13,134
Enterprise
  • 12,352
  • it is simple to change default password length ? are you sure ? I ask this because command passwd is connecting to command mcrypt - and mcrypt is per default at size of 512 ciphers ! – dschinn1001 Aug 05 '13 at 19:48
  • Your question implies you are simply trying to log into Ubuntu using a short password. (Note that in the common-password file you can also select the password encryption algorithm). Are you trying to do something else? – Enterprise Aug 05 '13 at 20:09