LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-26-2013, 10:10 AM   #1
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
cmpat mode in nsswitch.conf


Hi All,

Can anyone give me exact insight on as to what does compat mode means and is used for in /etc/nsswitch.conf. This is what i know about it

Quote:
You can put special codes in the /etc/passwd, /etc/group, and /etc/shadow files that cause the system, when you specify the compat method in nsswitch.conf, to combine and modify entries in the local files and the NIS maps. That is, a plus sign (+) at the beginning of a line in one of these files adds NIS information; a minus sign () removes information.
Secondly recently i faced an issue where an ssh was being denied for a particular user and user was coming from ldap. When i used getent to reterieve user details it was shwoing the correct but ssh was failing.

The nsswitch.conf entry for passwd was like this

Code:
passwd: files vas4 ldap
User was coming from ldap but authentication was failing, then i added an entry like below in /etc/passwd and everything started working

Code:
+testuser
It worked but i was not able to understand how and i am still confused, so anyone please explain about it. It was on RHEL 5.6.

Please do ask for more information if the issue is not clear to you, i would try to explain more.
 
Old 03-27-2013, 02:53 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Code:
passwd: files vas4 ldap
It means, for users authentication, your system will first check for system's local passwd file i.e. /etc/passwd, then vas4 and then ldap. So in order to authenticate user from ldap, make it like:

Code:
passwd: ldap files vas4
 
Old 03-28-2013, 02:04 AM   #3
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
It means, for users authentication, your system will first check for system's local passwd file i.e. /etc/passwd, then vas4 and then ldap. So in order to authenticate user from ldap, make it like:
Thanks but i already know what you just told me. My question was regarding COmpat mode and how making an entry "+testuser" made the things work. I would request you to read the question little more carefully.

Last edited by Rohit_4739; 03-28-2013 at 02:07 AM.
 
  


Reply


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
nsswitch.conf czezz Solaris / OpenSolaris 1 12-08-2009 08:37 AM
/etc/nsswitch.conf sulekha Linux - Networking 1 11-05-2008 09:33 AM
nsswitch.conf vs host.conf question mokku Linux - Newbie 0 03-03-2008 11:18 AM
/etc/nsswitch.conf blackzone Linux - Networking 2 04-04-2006 06:32 PM
nsswitch.conf and host.conf differences peter72 Linux - Networking 4 10-23-2004 02:02 AM


All times are GMT -5. The time now is 06:12 AM.

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