Results 1 to 1 of 1

Thread: sudoers won't talk to LDAP

  1. #1
    Join Date
    Nov 2008

    Post sudoers won't talk to LDAP

    Hello Ubuntu

    On our network we have our sudoers stored in LDAP. This works fine on the CentOS 5.4 clients by placing into /etc/ldap.conf

    sudoers_base ou=sudoers,ou=Services,dc=example,dc=net
    and in /etc/nsswitch.conf we have the entry:

    sudoers: ldap
    (setting this setting to just 'ldap' instead of 'files ldap' does not render the machine unbootable as happens if you set passwd and group this way).

    However I am attempting to set this up on an Ubuntu 9.10 client and getting no joy so far. I have the same settings in /etc/ldap.conf and /etc/nsswitch.conf and cannot get sudoers to work.

    On the Ubuntu box, I can get LDAP entries by typing in getent passwd | grep ldapAccount, however when you attempt to sudo it fails:

    bluethundr@ubuntu3:~$ sudo bash
    >>> /etc/sudoers: syntax error near line 0 <<<
    sudo: parse error in /etc/sudoers near line 0
    sudo: no valid sudoers sources found, quitting
    We leave our sudoers file blank intentionally in order to manage this via LDAP. Again, this problem is ONLY happening under Ubuntu and not under Centos 5.4.

    The only real difference that I see between the two clients is the sudo version. Could it be that under ubuntu LDAP sudo support isn't compiled in? if so how to recompile it so that it does?

    CentOS 5.4 sudo version:
    [root@ldap2 ~]# sudo -V
    Sudo version 1.7.2p1
    Ubuntu 9.10 sudo version:

    root@ubuntu3:~# sudo -V
    Sudo version 1.7.0

    [root@ldap2 ~]# sudo -V
    Sudo version 1.7.2p1
    And here are the linkages:

    CentOS 5.4:

    [root@ldap2 ~]# ldd $(which sudo) => /lib64/ (0x00002aaaaacc8000) => /lib64/ (0x00002aaaaaee0000) => /lib64/ (0x00002aaaab0e4000) => /lib64/ (0x00002aaaab2f0000) => /usr/lib64/ (0x00002aaaab4f4000) => /lib64/ (0x00002aaaab72e000) => /lib64/ (0x00002aaaaba86000) => /usr/lib64/ (0x00002aaaabc9e000) => /lib64/ (0x00002aaaabeac000)
    	/lib64/ (0x00002aaaaaaab000) => /lib64/ (0x00002aaaac0f3000) => /usr/lib64/ (0x00002aaaac308000) => /lib64/ (0x00002aaaac521000) => /lib64/ (0x00002aaaac76e000) => /lib64/ (0x00002aaaacabf000) => /usr/lib64/ (0x00002aaaaccf7000) => /usr/lib64/ (0x00002aaaacf26000) => /lib64/ (0x00002aaaad1bb000) => /usr/lib64/ (0x00002aaaad3bd000) => /usr/lib64/ (0x00002aaaad5e3000) => /usr/lib64/ (0x00002aaaad7f7000) => /lib64/ (0x00002aaaad9ff000)

    Ubuntu 9.10
    bluethundr@ubuntu3:~$ ldd $(which sudo) =>  (0x00914000) => /lib/ (0x00753000) => /lib/tls/i686/cmov/ (0x00223000) => /usr/lib/ (0x00fa1000) => /lib/tls/i686/cmov/ (0x004f1000) => /usr/lib/ (0x00f35000)
    	/lib/ (0x00d75000) => /lib/tls/i686/cmov/ (0x00345000) => /usr/lib/ (0x008d0000) => /usr/lib/ (0x00b77000) => /lib/tls/i686/cmov/ (0x002e3000) => /usr/lib/ (0x001df000) => /lib/ (0x007d6000) => /lib/ (0x003f3000) => /lib/ (0x00110000)

    Thanks for any input you may have!
    Attached Files Attached Files
    Last edited by bluethundr; November 19th, 2010 at 07:16 PM. Reason: refined question

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts