Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "integrate the schema ppolicy"
- ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
- ldapadd -Y EXTERNAL -H ldapi:/// << EOF
- dn: cn=module{0},cn=config
- changetype: modify
- add: olcModuleLoad
- olcModuleLoad: ppolicy
- EOF
- echo "integrate the overlay"
- ldapadd -Y EXTERNAL -H ldapi:/// <<EOF
- dn: olcOverlay=ppolicy,olcDatabase={1}hdb,cn=config
- objectClass: olcPPolicyConfig
- olcOverlay: ppolicy
- objectClass: olcOverlayConfig
- olcPPolicyDefault: cn=default,ou=policies,dc=entreprise,dc=com
- #olcPPolicyUseLockout: FALSE
- #olcPPolicyForwardUpdates: FALSE
- EOF
- echo "integrate the OU and the politic by default"
- ldapadd -xc -w "pass" -D cn=admin,dc=entreprise,dc=com <<EOF
- dn: ou=policies,dc=entreprise,dc=com
- objectClass: organizationalUnit
- objectClass: top
- ou: policies
- dn: cn=default,ou=policies,dc=entreprise,dc=com
- cn: default
- sn: default policy
- #objectClass: pwdPolicyChecker
- objectClass: pwdPolicy
- objectClass: person
- objectClass: top
- pwdLockout: TRUE
- pwdAttribute: userPassword
- EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement