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 04-02-2013, 06:17 AM   #1
hitesh_ingole2000
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
pasword policy with pam.d is not working


I want password policy to be aplicable using pam for example user password should have atleast on upcase character one lowercase and one digit
i found few blogs which gave the steps to edit in /etc/pam.d/system-auth
i also tried the auto lock function in the same file but it didnt worked
is there anything which i forgot do i need to restart anything or do i have to enable pam for authentication

[root@Hitesh_s_mailserver_master ~]# cat /etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_tally.so no_magic_root
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 required pam_tally.so deny=3 no_magic_root lock_time=180
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account required pam_permit.so

password requisite pam_cracklib.so try_first_pass retry=3 type= minlen=8 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=0

password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
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
[root@Hitesh_s_mailserver_master ~]#
 
Old 04-02-2013, 07:09 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Hello,

pam_passwdqc is exactly what you need (http://linux.die.net/man/8/pam_passwdqc)

Set Min paramter to achieve your goal

password required pam_passwdqc.so min=

Thanks
 
Old 04-03-2013, 05:37 AM   #3
hitesh_ingole2000
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Should i disable the previous changes
 
Old 04-03-2013, 06:26 AM   #4
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Yes , try pam_passwdqc in place of pam_cracklib
 
Old 04-03-2013, 07:53 AM   #5
hitesh_ingole2000
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
I tried replacing the cracklib but it gave me an error while resetting password


"passwd: Critical error - immediate abort"
 
Old 04-03-2013, 08:51 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Here's a dumb qn; is pam_passwdqc installed?
 
  


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
Configure my Redhat directory server password policy and account lockout policy arunplanet Linux - Newbie 4 10-06-2012 08:59 AM
Passwowd policy not working martinvincent.88 Linux - Newbie 6 09-22-2012 12:30 AM
PAM LDAP authentication password policy questions codeape Linux - Security 0 08-26-2008 02:10 AM
LDAP + PAM Password Policy. FragInHell Linux - Security 0 11-29-2007 10:16 PM
PAM set a no user login policy varoquau Linux - Security 2 10-28-2003 06:37 AM

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

All times are GMT -5. The time now is 06:29 PM.

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