Hello,
This is rhel 6.2. This client is already joined on ldap master server and I can login with my credentials. But when I switch with sudo it fails.
Code:
[john@prod2 ~]$ sudo su -
sudo: no valid sudoers sources found, quitting
[john@prod2 ~]$
[john@prod2 ~]$ ls -l /etc/sudoers
-r--r----- 1 root root 1422 Oct 8 12:38 /etc/sudoers
[john@prod2 ~]$
[john@prod2 /]# ls -l /etc/ldap.conf /etc/pam_ldap.conf /etc/openldap/ldap.conf
-rw-r--r-- 1 root root 832 Oct 8 13:06 /etc/ldap.conf
-rw-r--r--. 1 root root 383 Oct 7 20:39 /etc/openldap/ldap.conf
lrwxrwxrwx 1 root root 9 Oct 8 13:10 /etc/pam_ldap.conf -> ldap.conf
[john@prod2 /]#
[john@prod2 ~]# cat /etc/nsswitch.conf | grep -i sudo
sudoers: ldap
[john@prod2 ~]#
If I compare it with another server, which is also rhel 6.2, here I can see difference. Here is non-working server -
Code:
[root@prod2 /]# sudo -V | grep 'ldap.*path'
ldap.conf path: /etc/nslcd.conf
ldap.secret path: /etc/ldap.secret
[root@prod2 /]#
Here is working server -
Code:
[root@prod3 /]# sudo -V | grep 'ldap.*path'
ldap.conf path: /etc/ldap.conf
ldap.secret path: /etc/ldap.secret
[root@prod3 /]#
How do I force it to read correct file, so it can go to correct directive ? In /etc/ldap.conf, sudoers path is already defined.
Code:
[root@prod2 ~]# cat /etc/ldap.conf | grep -i sudo
## sudoer-specific settings
sudoers_base ou=sudoers,dc=test123,dc=com
sudoers_timed false
sudoers_debug 0
[root@prod2 ~]#