1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash . ./settings.sh ( echo "dn: cn=config" echo "changetype: modify" echo "replace: nsslapd-allow-anonymous-access" echo "nsslapd-allow-anonymous-access: off" echo "" ) | ldapmodify -x -h ${ldap_host} -D "${ldap_binddn}" -w "${ldap_bindpw}"