CONTRIBUTING.d/patches: Please provide a git-range-diff(1)
[man-pages.git] / man5 / nss.5
blob2ea1b48030dfaadc26bff33ee93f8692f83a7f2f
1 .\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
2 .\" Author: Ulrich Drepper <drepper@redhat.com>
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-only
5 .\"
6 .TH nss 5 (date) "Linux man-pages (unreleased)"
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.
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.
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.
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.
39 The variables currently recognized are:
40 .TP
41 \fBNETID_AUTHORITATIVE =\fR \fITRUE\fR|\fIFALSE\fR
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 \fBas is\fR.
54 The system administrator has to make sure it is correctly generated.
55 .TP
56 \fBSERVICES_AUTHORITATIVE =\fR \fITRUE\fR|\fIFALSE\fR
57 If set to TRUE, the NIS backend for the
58 .BR getservbyname (3)
59 and
60 .BR getservbyname_r (3)
61 functions will assume that the
62 .I services.byservicename
63 NIS map exists and is authoritative, particularly
64 that it contains both keys with /proto and without /proto for both
65 primary service names and service aliases.
66 The system administrator has to make sure it is correctly generated.
67 .TP
68 \fBSETENT_BATCH_READ =\fR \fITRUE\fR|\fIFALSE\fR
69 If set to TRUE, the NIS backend for the
70 .BR setpwent (3)
71 and
72 .BR setgrent (3)
73 functions will read the entire database at once and then
74 hand out the requests one by one from memory with every corresponding
75 .BR getpwent (3)
77 .BR getgrent (3)
78 call respectively.
79 Otherwise, each
80 .BR getpwent (3)
82 .BR getgrent (3)
83 call might result in a network communication with the server to get
84 the next entry.
85 .SH FILES
86 \fI/etc/default/nss\fR
87 .SH EXAMPLES
88 The default configuration corresponds to the following configuration file:
90 .in +4n
91 .EX
92 NETID_AUTHORITATIVE=FALSE
93 SERVICES_AUTHORITATIVE=FALSE
94 SETENT_BATCH_READ=FALSE
95 .EE
96 .in
97 .\" .SH AUTHOR
98 .\" Ulrich Drepper <drepper@redhat.com>
99 .\"
100 .SH SEE ALSO
101 \fInsswitch.conf\fR