LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-05-2015, 06:02 AM   #1
prakashk
LQ Newbie
 
Registered: Dec 2015
Posts: 5

Rep: Reputation: Disabled
password policy is not working well.


Hi All,

I have implemented password policy on RHEL 6.5 64 bit. I have attached the configuration files which used on sever side.
Quote:
#%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 sufficient pam_fprintd.so
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_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=
#password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password requisite pam_cracklib.so try_first_pass retry=3 type= minlen=7 dcredit=-2 ucredit=-1 lcredit=-2 ocredit=-2
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=5

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
Quote:
#%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 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_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=
#password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok

password requisite pam_cracklib.so try_first_pass retry=3 type= minlen=7 dcredit=-2 ucredit=-1 lcredit=-2 ocredit=-2
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=5
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
scenario:-

When first time the user password expire then it will go with password policy well or working.

When user itself to change password from his own console if password doesn't expire then password can not implemented as per password policy.

Do anyone have an idea. please help.

Appreciate your help!!!

Thanks,
Prakash

Last edited by prakashk; 12-05-2015 at 06:06 AM. Reason: attchment
 
Old 12-06-2015, 03:01 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
1- Which files are these?
2- What do you want to achieve?
3- I don't quite understand the problem. Can you restate it in different words, or elaborate? What can not be implemented?
 
Old 12-08-2015, 01:58 AM   #3
prakashk
LQ Newbie
 
Registered: Dec 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
password policy is not working well

Quote:
Originally Posted by berndbausch View Post
1- Which files are these?
2- What do you want to achieve?
3- I don't quite understand the problem. Can you restate it in different words, or elaborate? What can not be implemented?
Hi Berndbausch,

Appreciate your help.

1-
These files are -
ls -ltrh /etc/pam.d/system-auth
ls -ltrh /etc/pam.d/password-auth

2. Above are the configuration files, these works well. but the scenario is -
First time the client user set his own password as per defined password policy.

Now the queries begins here.

The user is able to change his own password and it takes a dictionary word. why he doesn't set his own password as per the defined policy rules.

Thanks,
PrakashK
 
Old 12-08-2015, 03:43 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by prakashk View Post
The user is able to change his own password and it takes a dictionary word. why he doesn't set his own password as per the defined policy rules.
You mean that your configuration allows dictionary words? And you want to know why?

Your configuration is minimally different from the default config. You just set up some rules about minimal length and number of digits, upper case, lower case and other characters, and remember the last 5 passwords.

So, if users can enter dictionary words, I don't understand why. Perhaps the dictionary on your system is broken.
 
Old 12-08-2015, 05:01 AM   #5
prakashk
LQ Newbie
 
Registered: Dec 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
if users can enter dictionary words, I don't understand why. Perhaps the dictionary on your system is broken.

I need to check whether dictionary broken on configured system. Am I right?
 
Old 12-08-2015, 05:40 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
That's my suggestion. Admittedly, I'm guessing.
EDIT: Or reinstall cracklib-dicts?

Do you have examples for the unexpected behaviour?
Does passwd behave differently if you use the original pam files?

Last edited by berndbausch; 12-08-2015 at 05:53 AM.
 
Old 12-14-2015, 01:14 AM   #7
prakashk
LQ Newbie
 
Registered: Dec 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi Berndbausch,

Sorry for late reply. I have cross-checked with RHEL and centos distribution, as well as implemneted the cracklib installation.

Now, it is working fine.

Thanks,
Prakashk
 
  


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
Password Policy zaeem Linux - Newbie 1 08-04-2014 11:37 AM
Password Policy Obscurious Linux - Security 6 04-17-2013 07:55 PM
Configure my Redhat directory server password policy and account lockout policy arunplanet Linux - Newbie 4 10-06-2012 08:59 AM
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 03:30 PM

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

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