LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2013, 01:20 PM   #1
cptrojan101
LQ Newbie
 
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
password minimum length for specific user only in centos


How to set password minimum length for specific local user only. I am using CentOs 5.
Tried some tweaks with /etc/pam.d/password-auth using pam_cracklib.so module.

Eg: cat /etc/pam.d/password-auth
-------
password requisite pam_cracklib.so try_first_pass retry=3 minlen=10
password requisite pam_passwdqc.so use_first_pass enforce=everyone
-------

But above setting works for all users and I want to be it specific for a particular user only, say with uid=510.

Thanks
cptrojan

Last edited by cptrojan101; 02-07-2013 at 01:21 PM.
 
Old 02-07-2013, 01:38 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
AFAIK PAM stacks are service-centric and nowhere in README.pam_cracklib does it suggest you can select specific users like that. You could check if /usr/share/doc/pam-*/txts/README.pam_succeed_if works for you although that kind of if-else usage could suggest a deliberate weakening of local password policies rather than strengthening it...
 
Old 02-07-2013, 07:51 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
You could use pam_exec http://debian.securedservers.com/ker...x-PAM_SAG.html, which enables you to call your own program, which could do extra processing just for them.

Of course, you could write your own pam module http://linuxdevcenter.com/pub/a/linu...m_modules.html
 
  


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
Minimum password length Domskis Linux - Newbie 4 10-20-2011 03:32 AM
Lock after invalid login attempts, session lock, minimum password length nstarz Linux - Security 1 06-24-2010 06:36 PM
The search term you specified (No) is under the minimum word length xpucto LQ Suggestions & Feedback 1 11-13-2007 06:37 AM
Setting Minimum Password Length (RH 7.1) zyft02 Linux - Newbie 1 02-26-2002 09:49 AM
search terms minimum length okok LQ Suggestions & Feedback 3 02-04-2002 01:22 AM


All times are GMT -5. The time now is 01:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration