Koozali.org: home of the SME Server

user-password 7 character limit in v7.2

Offline jfarschman

  • *
  • 406
  • +0/-0
user-password 7 character limit in v7.2
« on: August 06, 2007, 08:06:57 PM »
Hello,

  I have worked out a way to set password limits in the command line so that I can have 5-character (crackable) passwords, but the server-manager is trouble. informing me that there is still a 7 character minimum

Code: [Select]

yum install pam_passwdqc


Then in  /etc/pam.d/system-auth (or actually the templates-custom) alter the required line for the password
Code: [Select]

password    required      pam_passwdqc.so enforce=none min=disabled,5,5,5,5 retry=100


created a user called 'deleteme' and then did

passwd deleteme

and it lets me set lame passwords.... But the server-manager still says they must be 7 characters.

I should also note there is a file /etc/login.defs with a minimum length, but that should not cause the problem?  

PASS_MIN_LEN    5
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline shell

  • ***
  • 117
  • +0/-0
Change to password policy
« Reply #1 on: August 06, 2007, 11:16:47 PM »
Hi all,

Got this info from the bug tracker and think it will be useful to have included somewhere in the wiki.  Bug #3039

7.2 has implemented a new password policy - dictated by pam module - that requires passwords have a minimum length of 7.

The password rules now are:

    *  Strong - Must pass all default cracklib tests and all "normal" tests.
    * Normal - Must have at least 1 digit (0-9), 1 upper ([A-Z]), 1 lower ([a-z]), 1 special char (/-?) and be longer than 6 characters.
    * None - passwords must be longer than 6 characters

This should not affect existing passwords, and shouldn't cause problems where the existing password is (to quote jfarschman :) ) "lame", ie less than 7 characters.

Cheers,
Shell

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: user-password 7 character limit in v7.2
« Reply #2 on: August 07, 2007, 12:21:12 AM »
Quote from: "jfarschman"
but the server-manager is trouble. informing me that there is still a 7 character minimum
The server manager password is for the Admin group, not Users (so you need to look at 'config passwordstrength Admin none' and all associated code)

But I would make doubly sure that you have NO outside access (pptp, ssh, etc.) if you are going to give weak passwords to your admin user.

Trevor B

Offline jfarschman

  • *
  • 406
  • +0/-0
user-password 7 character limit in v7.2
« Reply #3 on: August 07, 2007, 04:06:55 PM »
Okay guys thanks for the digging,

But....

I have looked at bugzilla 3039 and was not satisfied with that answer.  3039 basically says "live with it" and I don't want to.  So I went on a quest to solve the problem so that I can have 5 character passwords with no variation in character type.

First, install alternate authentication system "pam_passwdqc"

Then alter the /etc/pam.d/system-auth to no longer use the other system and start using the new system.

RESULTS
Inside the command-line I can set lame passwords just fine.  I set the password 12345 for my test user using the passwd command.  The problem is the GUI (server-manager) does not allow a shorter password

And I do not mean for the admin use... sure that is different.
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline pmceache

  • 9
  • +0/-0
sme 7.2 password length
« Reply #4 on: August 08, 2007, 02:40:30 PM »
i have fixed this on my server by altering the file :
/usr/lib/perl5/site_perl/esmith/FormMagic on line 789.  Change the 7 to a 5 & "> 6" to "> 4", save the file & give it a try. This worked for me.

sub validate_password
{
    my ($fm,$strength,$pass) =3D @_;

    use Crypt::Cracklib;

    my $reason;

    if ($strength eq "none") {
        return $fm->localise("Passwords must be at least 7 characters =
long") unless (length($pass) > 6);
        return "OK";
    }
...

Offline jfarschman

  • *
  • 406
  • +0/-0
Short passwords - [SOLVED]
« Reply #5 on: August 08, 2007, 03:50:53 PM »
pmceache,

  Excellent!  That does the trick.  I have never messed with FormMagic and should probably look at it more.  It looks like it is enforcing system limits and responding with appropriate error messaging when necessary.

  So... change the system and then change FormMagic.pm as well.

  Solid advice.

  However, if you are following our advice you should know that FormMagic.pm is provided by the e-smith-formmagick rpm and any changes you make will be overwritten upon update.
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com

Offline pmceache

  • 9
  • +0/-0
password length
« Reply #6 on: August 08, 2007, 04:19:12 PM »
this may need to be done through a custom template then. I have never done anthing with those yet so if you have some advice that would be great.
...

Offline jfarschman

  • *
  • 406
  • +0/-0
user-password 7 character limit in v7.2
« Reply #7 on: August 08, 2007, 05:24:18 PM »
pmcreache,

  There is no template for the FormMagic.pm file and I am not sure I want one.  It may be better to write a script that checks nightly to see if the a new rpm was installed and then sends the admin an email.

  We could also write a sed substitution line that would make the changes.

  My part of the change to the system-auth file can be handled in templates-custom, but not the FormMagic.pm... at least not with out rebuilding the RPM and managing it yourself.
Jay Farschman
ICQ - 60448985
jay@hitechsavvy.com