Guest User

Untitled

a guest
Jun 25th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. assumption:
  2.  
  3. /etc/openldap/ldap.conf is correct:
  4.  
  5. SASL_NOCANON on
  6. URI ldaps://ipa.foo.local
  7. BASE dc=foo,dc=local
  8. TLS_CACERT /etc/ipa/ca.crt
  9.  
  10. check LDAP:
  11.  
  12. ldapsearch -x -D 'cn=Directory Manager' -w password "(objectClass=*)"
  13.  
  14. create new bindDN:
  15.  
  16. create a script:
  17.  
  18. #!/bin/bash
  19.  
  20. # run on the FreeIPA server
  21.  
  22. user="${1}"
  23.  
  24. cat <<EOF >ldap-binddn.update
  25. dn: uid=${user},cn=sysaccounts,cn=etc,dc=foo,dc=local
  26. add:objectclass:account
  27. add:objectclass:simplesecurityobject
  28. add:uid:${user}
  29. add:userPassword:changeme
  30. add:passwordExpirationTime:20380119031407Z
  31. add:nsIdleTimeout:0
  32. EOF
  33.  
  34. cat ldap-binddn.update
  35.  
  36. ipa-ldap-updater ldap-binddn.update
  37.  
  38. test:
  39.  
  40. ldapsearch -v -x -D 'uid=tomcat,cn=sysaccounts,cn=etc,dc=foo,dc=local' -w changeme "(objectClass=*)"
Add Comment
Please, Sign In to add comment