I configured sudoers ldap (with openldap as backend LDAP) using the instruction provided from the official sudoers website. (link)
Also restricted /etc/sudo-ldap.conf with 600 root:root permissions so that the normal users in the machine won't be able to know the LDAP server to which they are talking.
But the ldap server at the moment allow anonymous access connections to everything including sudoers OU. Is it possible in anyway to restrict the sudoers OU (say ou=sudoers,dc=example,dc=com) on the ldap server to a specific user and keep rest of the ldap structure for anonymous access ? (I couldn't figure out a proper way to do with access control)
Configuration details:
slapd.conf:
access to dn.subtree="dc=example,dc=com"
by * read
sudo-ldap.conf:
uri ldap://LDAP_SERVER
sudoers_base ou=sudoers,dc=example,dc=com
Let me know if you need further details.