LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-25-2012, 11:33 AM   #1
Kapn.K
LQ Newbie
 
Registered: Oct 2010
Distribution: RHEL, Fedora, Ubuntu
Posts: 15

Rep: Reputation: 0
RHEL 5.8. Password Complexity and disable suggestions.


I'm trying to enforce password complexity and am not getting the results I expect. I've searched, read the man and readme for every thing I can think of. My requirements are 12 char and 3 or more char types. The suggestions rarely meet this so they are unacceptable. Even when I choose my own which meets the requirements. It won't work. I would also like to disable_firstupper_lastdigit. Would I just append that to the passwdqc line? Here is my system-auth-ac:

Code:
#%PAM-1.0
auth required pam_env.so
auth required pam_tally.so onerr=fail per_user deny=3 unlock_time=120
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth required pam_deny.so

account required pam_unix.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so

password requisite pam_passwdqc.so min=disabled,disabled,disabled,12,12 retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok rem
ember=24
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_
uid
session required pam_unix.so
selinux is disabled and the password I tried to use is tH1s,should:work

Last edited by Kapn.K; 07-25-2012 at 01:50 PM. Reason: add selinux status and password
 
Old 07-25-2012, 02:37 PM   #2
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
For strictly complexity you will want to add the line:
Code:
password     requisite    pam_cracklib.so minlen=12 lcredit=-1 ucredit=-1 ocredit=-1 dcredit=-1
Looking into the other things.
 
Old 07-25-2012, 03:12 PM   #3
Kapn.K
LQ Newbie
 
Registered: Oct 2010
Distribution: RHEL, Fedora, Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbscores View Post
For strictly complexity you will want to add the line:
Code:
password     requisite    pam_cracklib.so minlen=12 lcredit=-1 ucredit=-1 ocredit=-1 dcredit=-1
Looking into the other things.
I was going to use that but I would have to pick the three types or require all 4 to meet our security requirements(3 of 4 types). The server I started to look at uses the pam_passwdqc.so module instead. passwdqc is a newer, more flexible, and I believe preferred, module. Even with other servers that are using cracklib, I still can't find a passwd that works and they're not using any credits. Just minlen. I and my other users are forced to use the suggested one(and usually they only use 2 char types). I'm trying to figure out how to get more debug info from the passwd process as well. I look in the /var/log/secure and see "sudo: pam_tally(sudo:setcred): Tally underflowed for user root" but I think it's just a generic error when the password change doesn't complete.
 
Old 07-26-2012, 10:38 AM   #4
Kapn.K
LQ Newbie
 
Registered: Oct 2010
Distribution: RHEL, Fedora, Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 0
OK. I just found this other thread which sheds a little more insight. Trying it now.
http://www.linuxquestions.org/questi...dqc-so-714407/
 
Old 07-26-2012, 12:50 PM   #5
Kapn.K
LQ Newbie
 
Registered: Oct 2010
Distribution: RHEL, Fedora, Ubuntu
Posts: 15

Original Poster
Rep: Reputation: 0
OK. I added random=0 to the system-auth-ac at the end of the line containing pam_passwdqc.

This does get rid of the generated one.

Here is the result:

Code:
Changing password for user testuser.

You can now choose the new password.

A valid password should be a mix of upper and lower case letters,
digits, and other characters.  You can use a 12 character long
password with characters from at least 3 of these 4 classes.
An upper case letter that begins the password and a digit that
ends it do not count towards the number of character classes used.

Enter new password:
Weak password: based on a dictionary word and not a passphrase.
Try again.
No generated suggestion but my test password won't work due to the dictionary check.
I guess I could rebuild the module with the dictionary check section commented but I would like to avoid that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Force password complexity - RHEL 5 savona Linux - Security 4 03-21-2011 12:07 PM
bash script to test string complexity (like password complexity) robertjinx Linux - Server 2 05-12-2010 02:58 PM
password complexity pasupuleti Linux - Security 18 09-24-2006 01:07 PM
password complexity moinpasha Linux - Security 11 09-13-2006 10:53 PM
password complexity moinpasha Programming 1 09-12-2006 05:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration