What do compat mean in name service switch?

5,365

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:
5,365

Related videos on Youtube

krishna verma
Author by

krishna verma

https://www.linkedin.com/in/codler/

Updated on September 18, 2022

Comments

  • krishna verma
    krishna verma almost 2 years

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

  • MadHatter
    MadHatter over 12 years
    +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.