Advertisement
gnu699

add_ppolicy

Oct 9th, 2013
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. #!/bin/bash
  2. echo "integrate the schema ppolicy"
  3. ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif
  4. ldapadd -Y EXTERNAL -H ldapi:/// << EOF
  5. dn: cn=module{0},cn=config
  6. changetype: modify
  7. add: olcModuleLoad
  8. olcModuleLoad: ppolicy
  9. EOF
  10.  
  11. echo "integrate the overlay"
  12. ldapadd -Y EXTERNAL -H ldapi:/// <<EOF
  13. dn: olcOverlay=ppolicy,olcDatabase={1}hdb,cn=config
  14. objectClass: olcPPolicyConfig
  15. olcOverlay: ppolicy
  16. objectClass: olcOverlayConfig
  17. olcPPolicyDefault: cn=default,ou=policies,dc=entreprise,dc=com
  18. #olcPPolicyUseLockout: FALSE
  19. #olcPPolicyForwardUpdates: FALSE
  20. EOF
  21.  
  22. echo "integrate the OU and the politic by default"
  23. ldapadd -xc -w "pass" -D cn=admin,dc=entreprise,dc=com  <<EOF
  24. dn: ou=policies,dc=entreprise,dc=com
  25. objectClass: organizationalUnit
  26. objectClass: top
  27. ou: policies
  28.  
  29. dn: cn=default,ou=policies,dc=entreprise,dc=com
  30. cn: default
  31. sn: default policy
  32. #objectClass: pwdPolicyChecker
  33. objectClass: pwdPolicy
  34. objectClass: person
  35. objectClass: top
  36. pwdLockout: TRUE
  37. pwdAttribute: userPassword
  38. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement