| 1 |
.\" Copyright 2006, Red Hat, Inc. |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: GPL-2.0-only |
| 5 |
.\" |
| 6 |
.TH nss 5 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
nss \- Name Service Switch configuration file |
| 9 |
.SH DESCRIPTION |
| 10 |
Each call to a function which retrieves data from a system database |
| 11 |
like the password or group database is handled by the Name Service |
| 12 |
Switch implementation in the GNU C library. |
| 13 |
The various services |
| 14 |
provided are implemented by independent modules, each of which |
| 15 |
naturally varies widely from the other. |
| 16 |
.P |
| 17 |
The default implementations coming with the GNU C library are by |
| 18 |
default conservative and do not use unsafe data. |
| 19 |
This might be very costly in some situations, especially when the databases |
| 20 |
are large. |
| 21 |
Some modules allow the system administrator to request |
| 22 |
taking shortcuts if these are known to be safe. |
| 23 |
It is then the system administrator's responsibility to ensure the assumption |
| 24 |
is correct. |
| 25 |
.P |
| 26 |
There are other modules where the implementation changed over time. |
| 27 |
If an implementation used to sacrifice speed for memory consumption, |
| 28 |
it might create problems if the preference is switched. |
| 29 |
.P |
| 30 |
The |
| 31 |
.I /etc/default/nss |
| 32 |
file contains a number of variable assignments. |
| 33 |
Each variable controls the behavior of one or more |
| 34 |
NSS modules. |
| 35 |
White spaces are ignored. |
| 36 |
Lines beginning with \[aq]#\[aq] |
| 37 |
are treated as comments. |
| 38 |
.P |
| 39 |
The variables currently recognized are: |
| 40 |
.TP |
| 41 |
.RI \f[B]NETID_AUTHORITATIVE\f[]\~=\~ TRUE | FALSE |
| 42 |
If set to TRUE, the NIS backend for the |
| 43 |
.BR initgroups (3) |
| 44 |
function will accept the information |
| 45 |
from the |
| 46 |
.I netid.byname |
| 47 |
NIS map as authoritative. |
| 48 |
This can speed up the function significantly if the |
| 49 |
.I group.byname |
| 50 |
map is large. |
| 51 |
The content of the |
| 52 |
.I netid.byname |
| 53 |
map is used |
| 54 |
.BR "as is" . |
| 55 |
The system administrator has to make sure it is correctly generated. |
| 56 |
.TP |
| 57 |
.RI \f[B]SERVICES_AUTHORITATIVE\f[]\~=\~ TRUE | FALSE |
| 58 |
If set to TRUE, the NIS backend for the |
| 59 |
.BR getservbyname (3) |
| 60 |
and |
| 61 |
.BR getservbyname_r (3) |
| 62 |
functions will assume that the |
| 63 |
.I services.byservicename |
| 64 |
NIS map exists and is authoritative, particularly |
| 65 |
that it contains both keys with /proto and without /proto for both |
| 66 |
primary service names and service aliases. |
| 67 |
The system administrator has to make sure it is correctly generated. |
| 68 |
.TP |
| 69 |
.RI \f[B]SETENT_BATCH_READ\f[]\~=\~ TRUE | FALSE |
| 70 |
If set to TRUE, the NIS backend for the |
| 71 |
.BR setpwent (3) |
| 72 |
and |
| 73 |
.BR setgrent (3) |
| 74 |
functions will read the entire database at once and then |
| 75 |
hand out the requests one by one from memory with every corresponding |
| 76 |
.BR getpwent (3) |
| 77 |
or |
| 78 |
.BR getgrent (3) |
| 79 |
call respectively. |
| 80 |
Otherwise, each |
| 81 |
.BR getpwent (3) |
| 82 |
or |
| 83 |
.BR getgrent (3) |
| 84 |
call might result in a network communication with the server to get |
| 85 |
the next entry. |
| 86 |
.SH FILES |
| 87 |
.I /etc/default/nss |
| 88 |
.SH EXAMPLES |
| 89 |
The default configuration corresponds to the following configuration file: |
| 90 |
.P |
| 91 |
.in +4n |
| 92 |
.EX |
| 93 |
NETID_AUTHORITATIVE=FALSE |
| 94 |
SERVICES_AUTHORITATIVE=FALSE |
| 95 |
SETENT_BATCH_READ=FALSE |
| 96 |
.EE |
| 97 |
.in |
| 98 |
.\" .SH AUTHOR |
| 99 |
.\" Ulrich Drepper <[email protected]> |
| 100 |
.\" |
| 101 |
.SH SEE ALSO |
| 102 |
.BR nsswitch.conf (5) |