nss(5)
๐ nss โ the tea on your Name Service Switch config file ๐
okay bestie, so this is nss(5), a File Formats Manual page, and it's literally the manual for the Name Service Switch configuration file. yes it's a config file manual. yes it's iconic. let's get into it โจ
๐ซถ NAME ๐ซถ
nss โ the Name Service Switch configuration file, aka the girl who decides where your system looks stuff up.
๐ธ DESCRIPTION ๐ธ
so every single time some function goes "hey, give me data from a system database" โ like the password database or the group database โ that whole thing gets handled by the Name Service Switch implementation inside the GNU C library. and the various services it provides? each one is implemented by its own independent module, and ngl these modules vary wildly from each other. no two are the same vibe. ๐
the default implementations that come with the GNU C library are, by default, conservative and do not use unsafe data. which sounds great and safe and cozy until you realize it can be very costly in some situations, especially when the databases are huge ๐ญ like, big big. so some modules let the system administrator request taking shortcuts โ but only if those shortcuts are known to be safe. and here's the thing: once you do that, it is entirely the system administrator's responsibility to make sure the assumption is actually correct. no takebacks, bestie. ๐ซฃ
then there are other modules where the implementation changed over time. so if an implementation used to sacrifice speed for memory consumption, switching that preference around might create problems. it's giving "the vibes changed and now nothing works." ๐
now, the /etc/default/nss file contains a number of variable assignments. each variable controls the behavior of one or more NSS modules. white spaces get ignored, and any line beginning with '#' is treated as a comment (so go off, annotate your config, we support it ๐).
the variables currently recognized are:
NETID_AUTHORITATIVE = TRUE|FALSEโ if you set this toTRUE, the NIS backend for theinitgroups(3)function will accept the info from thenetid.bynameNIS map as authoritative. this can speed up the function significantly if thegroup.bynamemap is large. the content of thenetid.bynamemap is used as is โ so the system administrator has to make sure it's correctly generated. you're on your own for that one, queen ๐SERVICES_AUTHORITATIVE = TRUE|FALSEโ if you set this toTRUE, the NIS backend for thegetservbyname(3)andgetservbyname_r(3)functions will assume that theservices.byservicenameNIS map exists and is authoritative โ particularly that it contains both keys with/protoand without/proto, for both primary service names and service aliases. again: the system administrator has to make sure it's correctly generated. no pressure or anything ๐SETENT_BATCH_READ = TRUE|FALSEโ if you set this toTRUE, the NIS backend for thesetpwent(3)andsetgrent(3)functions will read the entire database at once and then hand out the requests one by one from memory with every correspondinggetpwent(3)orgetgrent(3)call respectively. otherwise, every singlegetpwent(3)orgetgrent(3)call might result in a network communication with the server just to get the next entry ๐ฎโ๐จ one at a time. over the network. yeah.
๐ FILES ๐
/etc/default/nss
โจ EXAMPLES โจ
the default configuration corresponds to the following configuration file:
NETID_AUTHORITATIVE=FALSE
SERVICES_AUTHORITATIVE=FALSE
SETENT_BATCH_READ=FALSE
like. all three off. the safest, most unbothered, minding-her-business config. we stan a conservative queen ๐ง
๐ SEE ALSO ๐
fr fr, if you're touching /etc/default/nss, remember: shortcuts are only safe when you know they're safe. the manpage said it, not me ๐ซถ
and that's the whole thing, bestie! this was nss(5) from Linux man-pages 6.20, dated 2026-02-08. go forth and configure responsibly ๐๐โญ
๐ฆ where this page comes from
- arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- ๐ the page's license: GPL-2.0-only
- Copyright 2006, Red Hat, Inc
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms