Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find how to change some password policy settings in OpenLDAP (on a system-wide level, not on a per user level) such that all LDAP account users (i.e., existing and new users) have their passwords to expire after 90 days.

I know the main parameter that controls this is the maxPasswdAge parameter but I am not sure how to set this. I have tried different ldapmodify options but it fails:

ldapmodify -W -x -D "cn=Manager,dc=mydomain,dc=local" -f test.ldif 

dn: cn=pwdpolicyentry,cn=common,cn=products,cn=OracleContext,o=my_company,dc=com
changetype: modify
replace: pwdMaxAge
pwdMaxAge: 7776000

The error message was ..

modifying entry "cn=pwdpoilicyentry,cn=common,cn=products,cn=Oraclecontext,dc=mydomain,dc=com"
ldapmodify :no such object(32)

matched DN: dc=mydomain,dc=com 

My questions are

Are there any alternatives to doing this, for example: just change a setting manually somewhere in some configuration file and restart the LDAP server.

Are there any services that need to be bounced once this is done?

share|improve this question
1  
How is the system using LDAP to pull this information? Is pam-ldap or nss-ldap being used? – Tim Jan 13 '12 at 14:42
    
Thanks for your reply .. think its using pam_ldap – Dominiqs Jan 16 '12 at 8:23

It looks like you may be missing entries in the tree to the policy entry.

You will need to load the slapo-ppolicy overlay. The man page for the module specifies what you need to setup. I find the Ztrax documentation useful as well.

share|improve this answer
    
Thanks for your help i will find out how to load that – Dominiqs Dec 6 '11 at 9:24
    
Thanks for your help but i think i already have slapo-overlay, any other thoughts please – Dominiqs Feb 21 '12 at 18:24

The tool to achieve what you need is ppolicy.

This a multi-step task involving:

  1. a module add;
  2. a schema add;
  3. a overlay add to a given database (it also defines which policy entry is the default policy);
  4. one or more entry adds which define the password policies (one can be the default policy).

In the entry defined at step 4 you can modify the pwdMaxAge attribute.

share|improve this answer

Your "user" entry in the LDAP directory needs to have 2 attributes:

passwordExp: on
passwordMaxAge: 8640000

8640000 = 100 days.

share|improve this answer
    
Tim Thanks very much but how do you change these attributes , what command will you use exactly – Dominiqs Jan 17 '12 at 15:00
    
Tim, still havent found out how to do this , i have had no solution or reply , any more suggestions .How do i set these attributes please – Dominiqs Mar 13 '12 at 10:21
    
which directory or config file are we talking about openldap.conf – Dominiqs Mar 23 '12 at 14:30
    
It's not OpenLDAP related. Maybe it's a setting found on: Sun ONE Directory Server – 473183469 Nov 10 '15 at 11:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.