Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What do compat mean in name service switch? /etc/nsswitch.conf

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Compat is used to support the +/- features of passwdand group local files. Historically if you wanted to include information from a different source e.g. NIS, you could put an entry in your password/group file +username +@netgroup which would cause the information for username or netgroup to be read from NIS. Mostly a single + was put at the end of the file to indicate that the whole NIS map should be used.

With NSS this is no longer required as you can now just specify the data sources in /etc/nsswitch.conf e.g.

passwd: files nisplus nis
share|improve this answer
2  
+1, absolutely, Iain. But it's not entirely useless these days, as in some cases I do still use the +@netgroup entry alongside compat to eg allow only database developers to have logins on a dev oracle box, without either having to duplicate their login in /etc/passwd (making NIS redundant) or having to allow everyone with a NIS entry to be valid on that box. Oh, and please forgive me for putting in a (possibly missing) colon. –  MadHatter Nov 16 '11 at 11:08

To use local files as the login information database.

share|improve this answer
2  
Sorry, but that's just plain wrong (and Iain is dead right, it's an enabler for the old +user/+@netgroup NIS inclusions). I went to downmark you, but it seemed a bit mean to a brand-new user (and somewhat ineffective, since you've only got 1 reputation). Welcome to SF, but may I urge you to think a little harder about your next answer? I look forward to reading it! –  MadHatter Nov 16 '11 at 11:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.