LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-22-2004, 01:52 PM   #1
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Rep: Reputation: 30
dcredit=1 not working


I would like to have a password policy inforced somehow ... pam is what I'm trying to use. I want to have a very elaborate policy later on, but for now I've been trying to do something simple.

Here is the simple policy:
1. password must contain at least 8 characters.
2. user can only retry 3 times
3. at least one of the characters must be a number.
4. at least one of the characters must be a lower case letter.

Here are the lines in /etc/pam.d/system-auth
Code:
password     requisite     /lib/security/$ISA/pam_cracklib.so  minlen=8 retry=3 dcredit=1 lcredit=1
password     sufficient     /lib/security/$ISA/pam_unix.so  nullok use_authtok md5 shadow nis
password     required     /lib/security/$ISA/pam_deny.so
The above policy isn't being enforced because I can always use "passwd" and change my password to an all lowercase 8 character string. For instance this password will pass the policy: zxcasdqw

I've shut down my server and rebooted and still I can change the password to all lowercase letters.

My system:
Fedora Core 2

RPMs installed:
pam-0.77-40
pam_smb-1.1.7-3.1
pam-devel-0.77-40
pam_krb5-2.0.10-1

While troubleshooting I put this in /etc/pam.d/passwd
Code:
password     requisite     /lib/security/pam_cracklib.so  minlen=8 retry=3 dcredit=1 lcredit=1
password     sufficient     /lib/security/pam_unix.so  nullok use_authtok md5 shadow nis
password     required     /lib/security/pam_deny.so
... nothing seems to work. Any ideas?

-- Tony
 
Old 10-26-2004, 11:49 AM   #2
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Original Poster
Rep: Reputation: 30
Figured it out ... dcredit=-1

OK, I figured out my problem.

I should be using a dcredit=-1 (rather than dcredit=1).

It seems that if I give a dcredit=1 .... then I've already given a credit of 1 digit BEFORE the password is even entered on the command line! The same goes for lcredit=1, ucredit=1, etc.

So ... If I have a minlen=8 lcredit=1 ucredit=1 ... then I can effectively type in a 6 character password and meet the minlen requirement! Holy Cow, Batman!

The proper entry should be:

Code:
password     requisite     /lib/security/$ISA/pam_cracklib.so  minlen=8 retry=3 dcredit=-1 lcredit=-1 ucredit=-1
--Tony
 
Old 05-18-2006, 05:41 AM   #3
sreedhar1109
LQ Newbie
 
Registered: Mar 2006
Location: India...
Distribution: Red Hat
Posts: 2

Rep: Reputation: 0
i am facing the same issues., i have given -1 for atleast one digit but still accepting everything as password...Is there any known version mismatch issues with PAM ?..

i am using RHEL 3.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
After Online update: Hard drive working and working dacosta SUSE / openSUSE 6 11-06-2004 12:14 AM
F1 - F10 not working when F13 - F20 working in Linux haivinay Linux - General 0 09-20-2004 07:31 AM
F3-F10 is not working when F13-F20 is working in redht-8. haivinay Linux - General 0 09-20-2004 06:39 AM
Link/Applet not working in all Linux browsers, but working in IE MasterPatricko Linux - Software 6 09-04-2004 03:39 AM
cannot download files in mozilla -save dialog not working, galeon not working cmisip Linux - General 0 08-03-2003 03:25 PM

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

All times are GMT -5. The time now is 11:05 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