Advertisement
gnu699

install_ldap

Sep 12th, 2013
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #
  4. service cron stop
  5. service slapd stop
  6. DEBIAN_FRONTEND=noninteractive aptitude install -y slapd ldap-utils db4.7-util
  7. service slapd stop
  8.  
  9. #
  10. rm -rf /etc/ldap/slapd.d/*
  11.  
  12. #
  13. rm -rf /var/lib/ldap/*
  14.  
  15. #
  16. slapadd -F /etc/ldap/slapd.d/ -n0 -l config_ldap.ldif
  17. cp DB_CONFIG /var/lib/ldap/
  18.  
  19. #
  20. slapadd -n1 -l tree_principal.ldif
  21.  
  22. #
  23. chown -R openldap.openldap /var/lib/ldap/ ; chown -R openldap.openldap /etc/ldap/slapd.d/ ; chmod -R 750 /etc/ldap/slapd.d/
  24.  
  25. #
  26. service slapd start
  27. service cron start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement