Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-08-2017, 06:14 PM   #1
LQ Newbie
Registered: Oct 2017
Posts: 4

Rep: Reputation: Disabled
LDAP authentication not reading /etc/ldap.conf

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.
[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 -
[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 -
[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.
[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 ~]#

Last edited by bsparks; 10-08-2017 at 06:17 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
http.conf LDAP authentication moonsun1124 Linux - Security 1 09-08-2016 12:38 AM
[LDAP] -Setup Ldap for user authentication based on time trung1490 Linux - Server 1 02-23-2016 01:53 PM
[SOLVED] LDAP authentication error [Can't contact LDAP server] from apache httpd jonathan_w_brown Linux - Server 6 12-28-2011 06:30 PM
Authentication Failure in LDAP after the Modification of ldap to ldaps url Linux - Newbie 3 06-03-2011 06:30 AM
[SOLVED] Apache authentication: allow LDAP group OR user named guest, but not all LDAP users AlucardZero Linux - Server 1 05-25-2011 04:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration