Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I install the Ubuntu, I set a short password(<4). Now I want to change the other short password by "passwd" or change passphrase on "Password and Keys" program, it needs a password >4 char.

share|improve this question
    
Why do u want to set a short password? That is not safe, try you change the password from root account even if you forced to do. –  karthick87 Aug 25 '12 at 18:48
6  
@karthick87 because my home computer is not Fort Knox. If strangers are messing with my desktop then I have bigger concerns than my computer. –  Torben Gundtofte-Bruun Sep 18 '13 at 18:24
1  
@karthick87 Why a short password? Ubuntu might run as a virtual machine and your virtualization software lacks copy and paste functionality for the command line of Linux guests (like Parallels desktop for Mac 8.0 does miss), then you want to access Ubuntu with a short password, or even better without a password at all. –  Pro Backup Feb 12 at 10:08

5 Answers 5

To change password use
su
command in terminal.
After su use
passwd
to change password.
The password can be of short length. This works in Linux Mint.

share|improve this answer

To set up a simple password, I tried the simple sudo passwd username method, but it failed on my Ubuntu Server 12.04 LTS.

So I tried to remove the obscure option from /etc/pam.d/common-passwd config file, but it still failed.

So I also removed the obscure option from /usr/share/pam-configs/unix config file. And then it worked :-)

I do agree that it should be simplier, when acting as su to set up a weak password, whatever the reason why one wants to do it! A warning saying "weak password, confirm?" would be perfect...

share|improve this answer

By default, Ubuntu requires a minimum password length of 6 characters, as well as some basic entropy checks. These values are controlled in the file /etc/pam.d/common-password, which is outlined below.

password        [success=2 default=ignore]      pam_unix.so obscure sha512

If you would like to adjust the minimum length to 4 characters, add the appropriate variable (minlen=4) to the end of the line. The modification is outlined below.

password        [success=2 default=ignore]      pam_unix.so obscure sha512 minlen=4

Source.

share|improve this answer
    
I couldn't get min= to work and it doesn't match the man page, despite the Wiki page. Seems to be minlen= –  John S Gruber Aug 25 '12 at 19:42
    
Thank you for the info. =) –  NlightNFotis Aug 25 '12 at 19:43
    
remove "obscure" for also disable complexity check –  Pisu Jul 3 '13 at 8:38
4  
sudo passwd user seems more useful –  gyozo kudor Mar 3 at 14:50

Bring up a terminal and edit /etc/pam.d/common-password

Change this line:

password    [success=1 default=ignore]  pam_unix.so obscure sha512

to:

password    [success=1 default=ignore]  pam_unix.so obscure sha512 minlen=4

Password also need a certain amount of complexity, as specified by the obscure parameter above.

password    [success=1 default=ignore]  pam_unix.so minlen=2 sha512

removes that check also.

This all presupposes that you think this is wise.

See man pam_unix

These work on my system.

share|improve this answer
    
this works for ubuntu12.04 –  David May 23 '13 at 14:37
    
valid for 13.04 too –  Torben Gundtofte-Bruun Sep 18 '13 at 18:33

use

sudo passwd user in a terminal

share|improve this answer
1  
This does not work. It does not provide the information required. –  NlightNFotis Aug 25 '12 at 19:17
9  
It does work. If you are root it will not force you to fallow the password strength requirements. –  user72421 Aug 25 '12 at 19:56
1  
This works fine for me. I'm able to set a user's password to a using this method, on an Ubuntu 12.04 LTS system. –  Eliah Kagan Sep 8 '12 at 1:35
1  
This works for me too and is a much simpler solution. Ubuntu 12.10, Lubuntu 12.04 –  Insperatus Jan 7 '13 at 7:38
1  
This will cause problems when you have an encrypted home directory, as it breaks the automatic decryption of the ecryptfs passphrase. –  guntbert Jan 16 at 22:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.