LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-17-2014, 12:17 PM   #1
vahab
Member
 
Registered: Jun 2011
Posts: 58

Rep: Reputation: Disabled
OpenLDAP ppolicy problem


Hi,
I am trying to make ppolicy work on openldap 2.4. I have found some good tutorials like this :
http://www.flagword.net/2013/02/open...omment-page-1/

However it does not work for me till now. I need to know where does openldap stores information regarding password like "Last Password Change" so it can decide when to expire a password.
Do we still need to inherit the users from "ShadowAccount" object class ?
Also I need to make exception for some users and never expire their passwords.

Thank you in advance
Vahab
 
Old 04-17-2014, 02:18 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by vahab View Post
Hi,
I am trying to make ppolicy work on openldap 2.4. I have found some good tutorials like this :
http://www.flagword.net/2013/02/open...omment-page-1/

However it does not work for me till now.
So does this mean that things ARE working for you, and if so...why open this thread???
Quote:
I need to know where does openldap stores information regarding password like "Last Password Change" so it can decide when to expire a password. Do we still need to inherit the users from "ShadowAccount" object class ?
Again, as with your other thread about openLDAP, did you bother to check the documentation?
http://www.openldap.org/doc/admin24/backends.html

There are several back ends that can be used.
Quote:
Also I need to make exception for some users and never expire their passwords.
..and back to "did you check the documentation or Google?"
http://www.openldap.org/doc/admin24/overlays.html
http://www.doxer.org/want-your-ldap-...oes-the-howto/

If you want some users to not expire, you create their own policy class and assign them to it. This is a VERY BAD IDEA..non-expiring passwords are INCREDIBLE security holes.
 
Old 04-17-2014, 07:48 PM   #3
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
Things are not working for me and I am trying to find out why.

Let me ask my question another way, maybe that's my bad.

After applying the ppolicy overlay, is there any way to see the information regarding each user ? I mean similar numerical values that can be read from /etc/shadow. Can we obtain these values use any ldapsearch command ?

I am not sure if this password policy is completely server side or a client side configuration is required. (pam_lookup_policy yes is ldap.conf ?)

Last edited by vahab; 04-18-2014 at 02:21 AM.
 
Old 04-18-2014, 09:24 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by vahab View Post
Things are not working for me and I am trying to find out why. Let me ask my question another way, maybe that's my bad.

After applying the ppolicy overlay, is there any way to see the information regarding each user ? I mean similar numerical values that can be read from /etc/shadow. Can we obtain these values use any ldapsearch command ?
You can list users in the policy group, or list complete user information, which will tell you what policy(s) apply to them. Read the man pages on the relevant LDAP commands.
Quote:
I am not sure if this password policy is completely server side or a client side configuration is required. (pam_lookup_policy yes is ldap.conf ?)
And back to "read the openLDAP documentation". You can set things up in a variety of ways. Which did you pick?

Last edited by TB0ne; 04-18-2014 at 02:36 PM.
 
Old 04-18-2014, 12:18 PM   #5
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
I followed the steps again and now it is working ! Maybe last time I missed something.
Thank you TB0ne for the follow up.

In my case it does not need "pam_lookup_policy yes" in sssd.conf and it is not necessary to include shadowAccount objectClass.

And for the ones who are reading this, this is my working configuration :

###cn=config
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModuleLoad: ppolicy
olcModulePath: /usr/lib64/openldap


dn: olcOverlay=ppolicy,olcDatabase={2}bdb,cn=config
objectClass: olcPPolicyConfig
olcOverlay: ppolicy
olcPPolicyDefault: cn=ppolicy,ou=policies,dc=example,dc=com
olcPPolicyUseLockout: TRUE
olcPPolicyHashCleartext: TRUE

######################################################
###dc=example,dc=com
dn: ou=policies,dc=example,dc=com
objectClass: top
objectClass: organizationalUnit
ou: policies

dn: cn=ppolicy,ou=policies,dc=example,dc=com
objectClass: top
objectClass: device
objectClass: pwdPolicyChecker
objectClass: pwdPolicy
cn: ppolicy
pwdAttribute: userPassword
pwdInHistory: 8
pwdMinLength: 8
pwdMaxFailure: 3
pwdFailureCountInterval: 1800
pwdCheckQuality: 0
pwdMustChange: TRUE
pwdGraceAuthNLimit: 0
pwdMaxAge: 7776000
pwdExpireWarning: 1209600
pwdLockoutDuration: 900
pwdLockout: TRUE
 
Old 07-06-2018, 01:26 AM   #6
ramkrishnan
LQ Newbie
 
Registered: Jul 2018
Posts: 5

Rep: Reputation: Disabled
ppolicy is not being enforced when I use the 'passwd' command

Does ppolicy work only with the 'ldappasswd' command?
My ppolicy is being enforced when I use the 'ldappasswd' command but not when I use the 'passwd' command.
The 'passwd' command however connects to the LDAP server settings only. Its just that the policy is not enforced.
Quote:
I am not sure if this password policy is completely server side or a client side configuration is required. (pam_lookup_policy yes is ldap.conf ?)

Last edited by ramkrishnan; 07-06-2018 at 01:29 AM.
 
Old 07-06-2018, 06:28 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ramkrishnan View Post
Does ppolicy work only with the 'ldappasswd' command?
My ppolicy is being enforced when I use the 'ldappasswd' command but not when I use the 'passwd' command. The 'passwd' command however connects to the LDAP server settings only. Its just that the policy is not enforced.
You need to read the LQ Rules and the "Question Guidelines"; you have:
  • Reopened a thread that had been closed for FOUR YEARS
  • Hijacked it with your own question
  • Not provided ANY useful details that would let us help you
Open your own thread for your own question, and when you do, provide the details (such as what you've done/tried, the version/distro of Linux, etc.). And did you read the man pages on the passwd command, and what it does? Mainly...it is for LOCAL accounts? If you're using LDAP, that's where things are set, obviously.

Last edited by TB0ne; 07-06-2018 at 06:48 AM.
 
Old 07-06-2018, 06:36 AM   #8
ramkrishnan
LQ Newbie
 
Registered: Jul 2018
Posts: 5

Rep: Reputation: Disabled
Quote:
You need to read the LQ Rules and the "Question Guidelines"; you have:
  • Reopened a thread that had been closed for FOUR YEARS
  • Hijacked it with your own question
  • Not provided ANY useful details that would let us help you
Open your own thread for your own question, and when you do, provide the details (such as what you've done/tried, the version/distro of Linux, etc.).
Please respond to this:
https://www.linuxquestions.org/quest...27-4175633389/
 
Old 07-06-2018, 06:49 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by ramkrishnan View Post
AGAIN, you need to read the LQ Rules; DO NOT CROSS POST things.
 
  


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
Trouble using openldap ppolicy in CentOS 6.3 Ratclaws Linux - Security 0 04-09-2013 07:44 PM
OpenLdap wit PPolicy moinshareef Linux - Server 3 12-27-2012 10:51 PM
how to enable or disable users with ppolicy OpenLDAP melive Linux - Server 4 11-16-2012 09:21 AM
OpenLDAP "pwdPolicySubentry" for ppolicy not applying cheetos Linux - Software 1 06-19-2011 06:24 PM
openldap ppolicy in RHEL5 frndrfoe Linux - Server 2 04-01-2010 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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