2

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?

Mei
  • 4,590
  • 8
  • 45
  • 53
Dominiqs
  • 167
  • 3
  • 7
  • 12
  • 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

3 Answers3

0

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.

BillThor
  • 27,737
  • 3
  • 37
  • 69
0

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.

473183469
  • 1,360
  • 1
  • 12
  • 23
-2

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

passwordExp: on
passwordMaxAge: 8640000

8640000 = 100 days.

Tim
  • 3,017
  • 17
  • 15