nsswitch.conf(5) File Formats Manual nsswitch.conf(5) nsswitch.conf - (Name Service Switch, (NSS)) /etc/nsswitch.conf GNU C . . ASCII , . . , . GNU C : aliases , getaliasent(3) . ethers ethernet. group , getgrent(3) . hosts , gethostbyname(3) . initgroups , getgrouplist(3). netgroup , . C glibc 2.1 NIS. networks , getnetent(3) . passwd , getpwent(3) . protocols , getprotoent(3) . publickey Secure_RPC, NFS NIS+. rpc , getrpcbyname(3) . services , getservent(3) . shadow , getspnam(3) . The GNU C Library ignores databases with unknown names. Some applications use this to implement special handling for their own databases. For example, sudo(8) consults the sudoers database. Delegation of subordinate user/group IDs can be configured using the subid database. Refer to subuid(5) and subgid(5) for more details. /etc/nsswitch.conf: passwd: compat group: compat shadow: compat hosts: dns [!UNAVAIL=return] files networks: nis [NOTFOUND=return] files ethers: nis [NOTFOUND=return] files protocols: nis [NOTFOUND=return] files rpc: nis [NOTFOUND=return] files services: nis [NOTFOUND=return] files . : o , , <>, <> <>. , ( ). o , , <<[NOTFOUND=return]>>. (, , ). /lib/libnss_.so.X . <>, <>, <> <>. hosts <>. passwd, group shadow <> (. ). X 1 ( glibc 2.0) 2 ( glibc 2.1 ). , <>, <>, <> <>. , . , . : [=] [!=] => success | notfound | unavail | tryagain => return | continue | merge ! , , . . -- . : success . <>. notfound , . <>. unavail . , , , . <>. tryagain . , - . <>. : return . . , , group notfound, initgroups, , . continue . merge [SUCCESS=merge] . , . ( GID ), . glibc 2.24. , getgrent(3) , . (compat) NSS <> <>, , . : passwd shadow: + NIS passwd/shadow. +@ . - NIS passwd/shadow. -@ . + , , NIS passwd/shadow. group: + NIS group. - NIS group. + , , NIS group. <>, , NSS, <> - passwd_compat, group_compat shadow_compat. libnss_.so.X, /lib. /etc/nsswitch.conf NSS /lib/libnss_compat.so.X <> /lib/libnss_db.so.X <> /lib/libnss_dns.so.X <> /lib/libnss_files.so.X <> /lib/libnss_hesiod.so.X <> /lib/libnss_nis.so.X <> /lib/libnss_nisplus.so.X <> <>, : aliases /etc/aliases ethers /etc/ethers group /etc/group hosts /etc/hosts initgroups /etc/group netgroup /etc/netgroup networks /etc/networks passwd /etc/passwd protocols /etc/protocols publickey /etc/publickey rpc /etc/rpc services /etc/services shadow /etc/shadow Starting with glibc 2.33, nsswitch.conf is automatically reloaded if the file is changed. In earlier versions, the entire file was read only once within each process. If the file was later changed, the process would continue using the old configuration. , (, /etc/passwd). , , , (Network Information Service (NIS)) (Domain Name Service (DNS)), C. (Name Service Switch), , Sun Microsystems C- Solaris 2. . getent(1), nss(5) Alex Nik , Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . nsswitch.conf(5)