Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a LDAP server and lots working servers. Our user's info are in LDAP . But sudoers list is stored in /etc/sudoers. Now the question is, how to store sudoers list in LDAP so that there is a center control of it?

We are using Fedora 12 on both LDAP server and working servers.

share|improve this question
up vote 3 down vote accepted

Follow the official instructions from README.LDAP, and the sudoers.ldap manual page.

  1. Make sure sudo is built with LDAP support.
  2. Update the LDAP schema.
  3. Import sudoers file into LDAP.
  4. Configure the sudoers service in nsswitch.conf.
share|improve this answer

Add sudo entry like below

dn: ou=sudoers,ou=people,dc=example,dc=com
ou: sudoers
objectClass: top
objectClass: organizationalUnit

dn: cn=sudogroup,ou=sudoers,ou=people,dc=example,dc=com
objectClass: top
objectClass: sudoRole
cn: sudogroup
sudoUser: thomas
sudoHost: ALL
sudoRunAs: ALL
sudoCommand: ALL

Add sudoers_base in ldap.conf for client.

sudoers_base ou=sudoers,ou=people,dc=example,dc=com

& Edit /etc/nsswitch.conf like below

sudoers : files ldap
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .