nsswitch.conf.5: update for readability and latest glibc
PATCH 1/1 nsswitch.conf.5: update for readability and latest glibc
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
A web version of the man page is available here for proof reading: http://prose.sourceforge.net/man/linux/nsswitch.conf.5.html
A patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Best regards,
Mark Bannister.
==================
nsswitch.conf.5 renamed from nsswitch.conf.5.old +208 -144
@@ -1,4 +1,5 @@ .\" Copyright (c) 1998, 1999 Thorsten Kukuk ([email protected]) +.\" Copyright (c) 2011, Mark R. Bannister <[email protected]> .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as
@@ -20,39 +21,32 @@ .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" -.\" This manual page based on the GNU C Library info pages. -.\" FIXME ? The use of quotes on this page is inconsistent with the -.\" rest of man-pages. -.\" -.TH NSSWITCH.CONF 5 1999-01-17 "Linux" "Linux Programmer's Manual" +.TH NSSWITCH.CONF 5 2011-10-13 "Linux" "Linux Programmer's Manual" .SH NAME -nsswitch.conf \- System Databases and Name Service Switch configuration file +nsswitch.conf \- Name Service Switch configuration file .SH DESCRIPTION -Various functions in the C Library need to be configured to work -correctly in the local environment. -Traditionally, this was done by -using files (e.g., \fI/etc/passwd\fP), but other nameservices (like the -Network Information Service (NIS) and the Domain Name Service (DNS)) -became popular, and were hacked into the C library, usually with a fixed -search order. -.LP -The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) -contain a cleaner solution of this problem. -It is designed after a method -used by Sun Microsystems in the C library of Solaris 2. -We follow their -name and call this scheme "Name Service Switch" (NSS). -The sources for -the "databases" and their lookup order are specified in the +The .I /etc/nsswitch.conf -file. -.LP -The following databases are available in the NSS: -.TP +file is a configuration file used by the GNU C Library to determine from +what sources to obtain name service information in a range of categories, +and in what order. +Each category of information is identified by a database name. +.LP +The file is plain ASCII text, with columns separated by spaces or tab +characters. +The first column defines the database name. +The remaining columns describe the order of sources to query and a +limited +set of actions that can be performed by lookup result. +.LP +The following databases are made available by the standard +GNU C Library: +.RS 3 +.TP 10 .B aliases Mail aliases, used by -.BR sendmail (8). -Presently ignored. +.BR getaliasent (3) +and related functions. .TP .B ethers Ethernet numbers.
@@ -60,31 +54,31 @@ .B group Groups of users, used by .BR getgrent (3) -functions. +and related functions. .TP .B hosts Host names and numbers, used by .BR gethostbyname (3) -and similar functions. +and related functions. .TP .B netgroup Network wide list of hosts and users, used for access rules. -C libraries before glibc 2.1 only support netgroups over NIS. +C libraries before glibc 2.1 only supported netgroups over NIS. .TP .B networks Network names and numbers, used by .BR getnetent (3) -functions. +and related functions. .TP .B passwd User passwords, used by .BR getpwent (3) -functions. +and related functions. .TP .B protocols Network protocols, used by .BR getprotoent (3) -functions. +and related functions. .TP .B publickey Public and secret keys for Secure_RPC used by NFS and NIS+.
@@ -92,23 +86,24 @@ .B rpc Remote procedure call names and numbers, used by .BR getrpcbyname (3) -and similar functions. +and related functions. .TP .B services Network services, used by .BR getservent (3) -functions. +and related functions. .TP .B shadow Shadow user passwords, used by -.BR getspnam (3). +.BR getspnam (3) +and related functions. +.RE .LP -An example +Here is an example .I /etc/nsswitch.conf -(namely, the default used when -.I /etc/nsswitch.conf -is missing): -.sp 1n +file: +.LP +.RS 3 .PD 0 .TP 16 passwd:
@@ -139,147 +134,216 @@ services: nis [NOTFOUND=return] files .PD +.RE .LP -The first column is the database. -The rest of the line specifies how the lookup process works. -You can specify the way it works for each database individually. -.LP -The configuration specification for each database can contain two -different items: -.PD 0 -.TP -* The service specification like `files', `db', or `nis'. -.TP -* The reaction on lookup result like `[NOTFOUND=return]'. -.PD -.LP -For libc5 with NYS, the allowed service specifications are `files', `nis', -and `nisplus'. -For hosts, you could specify `dns' as extra service, for -passwd and group `compat', but not for shadow. -.LP -For glibc, you must have a file called -.BI /lib/libnss_SERVICE.so. X -for every SERVICE you are using. -On a standard installation, you could use -`files', `db', `nis', and `nisplus'. -For hosts, you could specify `dns' as -extra service, for passwd, group, and shadow `compat'. -These services will not -be used by libc5 with NYS. +The first column is the database name. +The remaining columns specify: +.RS 3 +.TP 3 +o +One or more service specifications e.g. "files", "db", or "nis". +The order the services appear on the line determine the order in which +those services will be queried, in turn, until a result is found. +.TP +o +Optional actions to perform if a particular result is obtained +from the preceding service, e.g. "[NOTFOUND=return]". +.RE +.LP +The service specifications supported on your system depend on the +presence of shared libraries, and are therefore extensible. +Libraries called +.IB /lib/libnss_SERVICE.so. X +will provide the named +.IR SERVICE . +On a standard installation, you can use +"files", "db", "nis", and "nisplus". +For the hosts database, you can additionally specify "dns". +For the passwd, group, and shadow databases, you can additionally specify +"compat" (see +.B "Compatibility mode" +below). The version number -.I X -is 1 for glibc 2.0 and 2 for glibc 2.1. -.LP -The second item in the specification gives the user much finer -control on the lookup process. -Action items are placed between two -service names and are written within brackets. -The general form is -.LP -`[' ( `!'? STATUS `=' ACTION )+ `]' +.B X +may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. +On systems with additional libraries installed, you may have access to +further services such as "hesiod", "ldap", "winbind" and "wins". +.LP +An action may also be specified following a service specification, that +modifies behaviour following a result obtained from the preceding data +source. +Action items take the general form: +.LP +.RS 3 +[ +.I STATUS += +.I ACTION +] +.br +[ ! +.I STATUS += +.I ACTION +] +.RE .LP where -.sp 1n -.PD 0 -.TP -STATUS => success | notfound | unavail | tryagain -.TP -ACTION => return | continue -.PD .LP +.RS 3 +.I STATUS +=> +.B success +| +.B notfound +| +.B unavail +| +.B tryagain +.br +.I ACTION +=> +.B return +| +.B continue +.RE +.LP +The ! negates the test, matching all possible results except the +one specified. The case of the keywords is insignificant. -The STATUS values are -the results of a call to a lookup function of a specific service. -They mean: -.TP +.LP +The +.I STATUS +value is matched against the result of the lookup function called by +the preceding service specification, and can be one of: +.RS 3 +.TP 10 .B success -No error occurred and the wanted entry is returned. -The default -action for this is `return'. +No error occurred and the requested entry is returned. +The default action for this condition is "return". .TP .B notfound -The lookup process succeeded, but the needed value was not found. -The default action is `continue'. +The lookup succeeded, but the requested entry was not found. +The default action for this condition is "continue". .TP .B unavail The service is permanently unavailable. This can either mean the -needed file is not available, or, for DNS, the server is not -available or does not allow queries. -The default action is -`continue'. +required file cannot be read, or, for network services, the server +is not available or does not allow queries. +The default action for this condition is "continue". .TP .B tryagain The service is temporarily unavailable. This could mean a file is locked or a server currently cannot accept more connections. -The default action is `continue'. -.SS Interaction with +/\- syntax (compat mode) -Linux libc5 without NYS does not have the name service switch but does -allow the user some policy control. -In -.I /etc/passwd -you could have entries of the form +user or +@netgroup -(include the specified user from the NIS passwd map), -\-user or \-@netgroup (exclude the specified user), -and + (include every user, except the excluded ones, from the NIS -passwd map). -Since most people only put a + at the end of +The default action for this condition is "continue". +.RE +.LP +The +.I ACTION +value can be one of: +.RS 3 +.TP 10 +.B return +Return a result now. +Do not call any further lookup functions. +.TP +.B continue +Call the next lookup function. +.RE +.SS Compatibility mode (compat) +The NSS "compat" service is similar to "files" except that it +additionally permits special entries in .I /etc/passwd -to include everything from NIS, the switch provides a faster -alternative for this case (`passwd: files nis') which doesn't -require the single + entry in -.IR /etc/passwd , -.IR /etc/group , -and -.IR /etc/shadow . -If this is not sufficient, the NSS `compat' service provides full -+/\- semantics. -By default, the source is `nis', but this may be -overridden by specifying `nisplus' as source for the pseudo-databases +for granting users or members of netgroups access to the system. +The following entries are valid in this mode: +.RS 3 +.TP 12 +.BI + user +Include the specified +.I user +from the NIS passwd map. +.TP +.BI +@ netgroup +Include all users in the given +.IR netgroup . +.TP +.BI \- user +Exclude the specified +.I user +from the NIS passwd map. +.TP +.BI \-@ netgroup +Exclude all users in the given +.IR netgroup . +.TP +.B + +Include every user, except previously excluded ones, in the +NIS passwd map. +.RE +.LP +By default the source is "nis", but this may be +overridden by specifying "nisplus" as source for the pseudo-databases .BR passwd_compat , .B group_compat and .BR shadow_compat . -These pseudo-databases are only available in GNU C Library. .SH FILES -A service named SERVICE is implemented by a shared object library named -.BI libnss_SERVICE.so. X +A service named +.I SERVICE +is implemented by a shared object library named +.IB libnss_SERVICE.so. X that resides in .IR /lib . +.RS 3 .TP 25 .PD 0 .I /etc/nsswitch.conf -configuration file +NSS configuration file. .TP -.BI /lib/libnss_compat.so. X -implements `compat' source for glibc2 +.IB /lib/libnss_compat.so. X +implements "compat" source. .TP -.BI /lib/libnss_db.so. X -implements `db' source for glibc2 +.IB /lib/libnss_db.so. X +implements "db" source. .TP -.BI /lib/libnss_dns.so. X -implements `dns' source for glibc2 +.IB /lib/libnss_dns.so. X +implements "dns" source. .TP -.BI /lib/libnss_files.so. X -implements `files' source for glibc2 +.IB /lib/libnss_files.so. X +implements "files" source. .TP -.BI /lib/libnss_hesiod.so. X -implements `hesiod' source for glibc2 +.IB /lib/libnss_hesiod.so. X +implements "hesiod" source. .TP -.BI /lib/libnss_nis.so. X -implements `nis' source for glibc2 +.IB /lib/libnss_nis.so. X +implements "nis" source. .TP -.I /lib/libnss_nisplus.so.2 -implements `nisplus' source for glibc 2.1 +.IB /lib/libnss_nisplus.so. X +implements "nisplus" source. .PD +.RE +.SH SEE ALSO +.BR getent (1), +.BR nss (5). .SH NOTES Within each process that uses .BR nsswitch.conf , -the entire file is read only once; if the file is later changed, the +the entire file is read only once. +If the file is later changed, the process will continue using the old configuration. .LP -With Solaris, it isn't possible to link programs using the NSS Service -statically. -With Linux, this is no problem. +Traditionally there was only a single source for service information, +often in the form of a single configuration +file (e.g. \fI/etc/passwd\fP). +However, as other nameservices, like the Network Information +Service (NIS) and the Domain Name Service (DNS), became popular, +a method was needed +that would be more flexible than fixed search orders coded into +the C library. +.LP +The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) +introduced a cleaner solution to the problem, based on the +.B "Name Service Switch" +mechanism used by Sun Microsystems in the Solaris 2 C library.
nsswitch.conf.5 renamed from nsswitch.conf.5.old +208 -144
452 lines not on this page · raw message
Quoted 8 lines · Mark R Bannister
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
Quoted 7 lines
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
A web version of the man page is available here for proof reading: http://prose.sourceforge.net/man/linux/nsswitch.conf.5.html
A patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Thanks,
Michael
.\" Copyright (c) 1998, 1999 Thorsten Kukuk ([email protected]) .\" Copyright (c) 2011, Mark R. Bannister <[email protected]> .\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
.\" MA 02111, USA.
.\"
.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual"
.SH NAME
nsswitch.conf \- Name Service Switch configuration file
.SH DESCRIPTION
The
.I /etc/nsswitch.conf
("Name Server Switch", NSS)
file is a configuration file used by the GNU C Library to determine
the sources from which to obtain name-service information in
a range of categories,
and in what order.
Each category of information is identified by a database name.
.LP
The file is plain ASCII text, with columns separated by spaces or tab
characters.
The first column specifies the database name.
The remaining columns describe the order of sources to query and a
limited set of actions that can be performed by lookup result.
.LP
The following databases are understood by the GNU C Library:
.TP 12
.B aliases
Mail aliases, used by
.BR getaliasent (3)
and related functions.
.TP
.B ethers
Ethernet numbers.
.TP
.B group
Groups of users, used by
.BR getgrent (3)
and related functions.
.TP
.B hosts
Host names and numbers, used by
.BR gethostbyname (3)
and related functions.
.TP
.B netgroup
Network-wide list of hosts and users, used for access rules.
C libraries before glibc 2.1 supported netgroups only over NIS.
.TP
.B networks
Network names and numbers, used by
.BR getnetent (3)
and related functions.
.TP
.B passwd
User passwords, used by
.BR getpwent (3)
and related functions.
.TP
.B protocols
Network protocols, used by
.BR getprotoent (3)
and related functions.
.TP
.B publickey
Public and secret keys for Secure_RPC used by NFS and NIS+.
.TP
.B rpc
Remote procedure call names and numbers, used by
.BR getrpcbyname (3)
and related functions.
.TP
.B services
Network services, used by
.BR getservent (3)
and related functions.
.TP
.B shadow
Shadow user passwords, used by
.BR getspnam (3)
and related functions.
.LP
Here is an example
.I /etc/nsswitch.conf
file:
.LP
.RS 4
.PD 0
.TP 16
passwd:
compat
.TP
group:
compat
.TP
shadow:
compat
.sp 1n
.TP
hosts:
dns [!UNAVAIL=return] files
.TP
networks:
nis [NOTFOUND=return] files
.TP
ethers:
nis [NOTFOUND=return] files
.TP
protocols:
nis [NOTFOUND=return] files
.TP
rpc:
nis [NOTFOUND=return] files
.TP
services:
nis [NOTFOUND=return] files
.PD
.RE
.LP
The first column is the database name.
The remaining columns specify:
.IP * 3
One or more service specifications e.g., "files", "db", or "nis".
The order of the services on the line determines the order in which
those services will be queried, in turn, until a result is found.
.IP *
Optional actions to perform if a particular result is obtained
from the preceding service, e.g., "[NOTFOUND=return]".
.RE
.LP
The service specifications supported on your system depend on the
presence of shared libraries, and are therefore extensible.
Libraries called
.IB /lib/libnss_SERVICE.so. X
will provide the named
.IR SERVICE .
On a standard installation, you can use
"files", "db", "nis", and "nisplus".
For the
.B hosts
database, you can additionally specify "dns".
For the
.BR passwd ,
.BR group ,
and
.BR shadow
databases, you can additionally specify
"compat" (see
.B "Compatibility mode"
below).
The version number
.B X
may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.
On systems with additional libraries installed, you may have access to
further services such as "hesiod", "ldap", "winbind" and "wins".
.LP
An action may also be specified following a service specification.
The action modifies the behaviour following a result obtained
from the preceding data source.
Action items take the general form:
.LP
.RS 4
.RI [ STATUS = ACTION ]
.br
.RI [! STATUS = ACTION ]
.RE
.LP
where
.LP
.RS 4
.I STATUS
=>
.B success
|
.B notfound
|
.B unavail
|
.B tryagain
.br
.I ACTION
=>
.B return
|
.B continue
.RE
.LP
The ! negates the test, matching all possible results except the
one specified.
The case of the keywords is not significant.
.LP
The
.I STATUS
value is matched against the result of the lookup function called by
the preceding service specification, and can be one of:
.RS 4
.TP 12
.B success
No error occurred and the requested entry is returned.
The default action for this condition is "return".
.TP
.B notfound
The lookup succeeded, but the requested entry was not found.
The default action for this condition is "continue".
.TP
.B unavail
The service is permanently unavailable.
This can mean either that the
required file cannot be read, or, for network services, that the server
is not available or does not allow queries.
The default action for this condition is "continue".
.TP
.B tryagain
The service is temporarily unavailable.
This could mean a file is
locked or a server currently cannot accept more connections.
The default action for this condition is "continue".
.RE
.LP
The
.I ACTION
value can be one of:
.RS 4
.TP 12
.B return
Return a result now.
Do not call any further lookup functions.
.TP
.B continue
Call the next lookup function.
.RE
.SS Compatibility mode (compat)
The NSS "compat" service is similar to "files" except that it
additionally permits special entries in
.I /etc/passwd
for granting users or members of netgroups access to the system.
The following entries are valid in this mode:
.RS 4
.TP 12
.BI + user
Include the specified
.I user
from the NIS passwd map.
.TP
.BI +@ netgroup
Include all users in the given
.IR netgroup .
.TP
.BI \- user
Exclude the specified
.I user
from the NIS passwd map.
.TP
.BI \-@ netgroup
Exclude all users in the given
.IR netgroup .
.TP
.B +
Include every user, except previously excluded ones, from the
NIS passwd map.
.RE
.LP
By default the source is "nis", but this may be
overridden by specifying "nisplus" as the source for the pseudo-databases
.BR passwd_compat ,
.BR group_compat ,
and
.BR shadow_compat .
.SH FILES
A service named
.I SERVICE
is implemented by a shared object library named
.IB libnss_SERVICE.so. X
that resides in
.IR /lib .
.RS 4
.TP 25
.PD 0
.I /etc/nsswitch.conf
NSS configuration file.
.TP
.IB /lib/libnss_compat.so. X
implements "compat" source.
.TP
.IB /lib/libnss_db.so. X
implements "db" source.
.TP
.IB /lib/libnss_dns.so. X
implements "dns" source.
.TP
.IB /lib/libnss_files.so. X
implements "files" source.
.TP
.IB /lib/libnss_hesiod.so. X
implements "hesiod" source.
.TP
.IB /lib/libnss_nis.so. X
implements "nis" source.
.TP
.IB /lib/libnss_nisplus.so. X
implements "nisplus" source.
.PD
.RE
.SH NOTES
Within each process that uses
.BR nsswitch.conf ,
the entire file is read only once.
If the file is later changed, the
process will continue using the old configuration.
.LP
Traditionally, there was only a single source for service information,
often in the form of a single configuration
file (e.g., \fI/etc/passwd\fP).
However, as other name services, such as the Network Information
Service (NIS) and the Domain Name Service (DNS), became popular,
a method was needed
that would be more flexible than fixed search orders coded into
the C library.
The Names Server Switch mechanism
(based on the mechanism used by Sun Microsystems in the Solaris 2 C library) introduced a cleaner solution to the problem.
.SH SEE ALSO
.BR getent (1),
.BR nss (5)
Quoted 12 lines · Michael Kerrisk (man-pages)
Quoted 10 lines · Mark R Bannister
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
Quoted 8 lines
Quoted 5 lines
A web version of the man page is available here for proof reading: http://prose.sourceforge.net/man/linux/nsswitch.conf.5.html
A patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Best regards,
Mark.
.\" Copyright (c) 1998, 1999 Thorsten Kukuk ([email protected]) .\" Copyright (c) 2012, Mark R. Bannister <[email protected]> .\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
.\" MA 02111, USA.
.\"
.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual"
.SH NAME
nsswitch.conf \- Name Service Switch configuration file
.SH DESCRIPTION
The
.I /etc/nsswitch.conf
file is a configuration file used by the GNU C Library to determine
the sources from which to obtain name-service information in
a range of categories,
and in what order.
Each category of information is identified by a database name.
.LP
The file is plain ASCII text, with columns separated by spaces or tab
characters.
The first column specifies the database name.
The remaining columns describe the order of sources to query and a
limited set of actions that can be performed by lookup result.
.LP
The following databases are understood by the GNU C Library:
.RS 4
.TP 10
.B aliases
Mail aliases, used by
.BR getaliasent (3)
and related functions.
.TP
.B ethers
Ethernet numbers.
.TP
.B group
Groups of users, used by
.BR getgrent (3)
and related functions.
.TP
.B hosts
Host names and numbers, used by
.BR gethostbyname (3)
and related functions.
.TP
.B netgroup
Network-wide list of hosts and users, used for access rules.
C libraries before glibc 2.1 supported netgroups only over NIS.
.TP
.B networks
Network names and numbers, used by
.BR getnetent (3)
and related functions.
.TP
.B passwd
User passwords, used by
.BR getpwent (3)
and related functions.
.TP
.B protocols
Network protocols, used by
.BR getprotoent (3)
and related functions.
.TP
.B publickey
Public and secret keys for Secure_RPC used by NFS and NIS+.
.TP
.B rpc
Remote procedure call names and numbers, used by
.BR getrpcbyname (3)
and related functions.
.TP
.B services
Network services, used by
.BR getservent (3)
and related functions.
.TP
.B shadow
Shadow user passwords, used by
.BR getspnam (3)
and related functions.
.RE
.LP
Here is an example
.I /etc/nsswitch.conf
file:
.LP
.RS 4
.PD 0
.TP 16
passwd:
compat
.TP
group:
compat
.TP
shadow:
compat
.sp 1n
.TP
hosts:
dns [!UNAVAIL=return] files
.TP
networks:
nis [NOTFOUND=return] files
.TP
ethers:
nis [NOTFOUND=return] files
.TP
protocols:
nis [NOTFOUND=return] files
.TP
rpc:
nis [NOTFOUND=return] files
.TP
services:
nis [NOTFOUND=return] files
.PD
.RE
.LP
The first column is the database name.
The remaining columns specify:
.RS 4
.TP 3
*
One or more service specifications, e.g. "files", "db", or "nis".
The order of the services on the line determines the order in which
those services will be queried, in turn, until a result is found.
.TP
*
Optional actions to perform if a particular result is obtained
from the preceding service, e.g. "[NOTFOUND=return]".
.RE
.LP
The service specifications supported on your system depend on the
presence of shared libraries, and are therefore extensible.
Libraries called
.IB /lib/libnss_SERVICE.so. X
will provide the named
.IR SERVICE .
On a standard installation, you can use
"files", "db", "nis", and "nisplus".
For the
.B hosts
database, you can additionally specify "dns".
For the
.BR passwd ,
.BR group ,
and
.BR shadow
databases, you can additionally specify
"compat" (see
.B "Compatibility mode"
below).
The version number
.B X
may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.
On systems with additional libraries installed, you may have access to
further services such as "hesiod", "ldap", "winbind" and "wins".
.LP
An action may also be specified following a service specification.
The action modifies the behaviour following a result obtained
from the preceding data source.
Action items take the general form:
.LP
.RS 4
.RI [ STATUS = ACTION ]
.br
.RI [! STATUS = ACTION ]
.RE
.LP
where
.LP
.RS 4
.I STATUS
=>
.B success
|
.B notfound
|
.B unavail
|
.B tryagain
.br
.I ACTION
=>
.B return
|
.B continue
.RE
.LP
The ! negates the test, matching all possible results except the
one specified.
The case of the keywords is not significant.
.LP
The
.I STATUS
value is matched against the result of the lookup function called by
the preceding service specification, and can be one of:
.RS 4
.TP 12
.B success
No error occurred and the requested entry is returned.
The default action for this condition is "return".
.TP
.B notfound
The lookup succeeded, but the requested entry was not found.
The default action for this condition is "continue".
.TP
.B unavail
The service is permanently unavailable.
This can mean either that the
required file cannot be read, or, for network services, that the server
is not available or does not allow queries.
The default action for this condition is "continue".
.TP
.B tryagain
The service is temporarily unavailable.
This could mean a file is
locked or a server currently cannot accept more connections.
The default action for this condition is "continue".
.RE
.LP
The
.I ACTION
value can be one of:
.RS 4
.TP 12
.B return
Return a result now.
Do not call any further lookup functions.
.TP
.B continue
Call the next lookup function.
.RE
.SS Compatibility mode (compat)
The NSS "compat" service is similar to "files" except that it
additionally permits special entries in
.I /etc/passwd
for granting users or members of netgroups access to the system.
The following entries are valid in this mode:
.RS 4
.TP 12
.BI + user
Include the specified
.I user
from the NIS passwd map.
.TP
.BI +@ netgroup
Include all users in the given
.IR netgroup .
.TP
.BI \- user
Exclude the specified
.I user
from the NIS passwd map.
.TP
.BI \-@ netgroup
Exclude all users in the given
.IR netgroup .
.TP
.B +
Include every user, except previously excluded ones, from the
NIS passwd map.
.RE
.LP
By default the source is "nis", but this may be
overridden by specifying "nisplus" as the source for the pseudo-databases
.BR passwd_compat ,
.B group_compat
and
.BR shadow_compat .
.SH FILES
A service named
.I SERVICE
is implemented by a shared object library named
.IB libnss_SERVICE.so. X
that resides in
.IR /lib .
.RS 4
.TP 25
.PD 0
.I /etc/nsswitch.conf
NSS configuration file.
.TP
.IB /lib/libnss_compat.so. X
implements "compat" source.
.TP
.IB /lib/libnss_db.so. X
implements "db" source.
.TP
.IB /lib/libnss_dns.so. X
implements "dns" source.
.TP
.IB /lib/libnss_files.so. X
implements "files" source.
.TP
.IB /lib/libnss_hesiod.so. X
implements "hesiod" source.
.TP
.IB /lib/libnss_nis.so. X
implements "nis" source.
.TP
.IB /lib/libnss_nisplus.so. X
implements "nisplus" source.
.PD
.RE
.SH NOTES
Within each process that uses
.BR nsswitch.conf ,
the entire file is read only once.
If the file is later changed, the
process will continue using the old configuration.
.LP
Traditionally there was only a single source for service information,
often in the form of a single configuration
file (e.g. \fI/etc/passwd\fP).
However, as other name services, such as the Network Information
Service (NIS) and the Domain Name Service (DNS), became popular,
a method was needed
that would be more flexible than fixed search orders coded into
the C library.
The Name Service Switch mechanism,
based on the mechanism used by Sun Microsystems in the Solaris 2 C library,
introduced a cleaner solution to the problem.
.SH SEE ALSO
.BR getent (1),
.BR nss (5)
.\" Copyright (c) 1998, 1999 Thorsten Kukuk ([email protected]) .\" Copyright (c) 2012, Mark R. Bannister <[email protected]> .\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
.\" MA 02111, USA.
.\"
.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual"
.SH NAME
nsswitch.conf \- Name Service Switch configuration file
.SH DESCRIPTION
The
.I /etc/nsswitch.conf
file is a configuration file used by the GNU C Library to determine
the sources from which to obtain name-service information in
a range of categories,
and in what order.
Each category of information is identified by a database name.
.LP
The file is plain ASCII text, with columns separated by spaces or tab
characters.
The first column specifies the database name.
The remaining columns describe the order of sources to query and a
limited set of actions that can be performed by lookup result.
.LP
The following databases are understood by the GNU C Library:
.RS 4
.TP 10
.B aliases
Mail aliases, used by
.BR getaliasent (3)
and related functions.
.TP
.B ethers
Ethernet numbers.
.TP
.B group
Groups of users, used by
.BR getgrent (3)
and related functions.
.TP
.B hosts
Host names and numbers, used by
.BR gethostbyname (3)
and related functions.
.TP
.B netgroup
Network-wide list of hosts and users, used for access rules.
C libraries before glibc 2.1 supported netgroups only over NIS.
.TP
.B networks
Network names and numbers, used by
.BR getnetent (3)
and related functions.
.TP
.B passwd
User passwords, used by
.BR getpwent (3)
and related functions.
.TP
.B protocols
Network protocols, used by
.BR getprotoent (3)
and related functions.
.TP
.B publickey
Public and secret keys for Secure_RPC used by NFS and NIS+.
.TP
.B rpc
Remote procedure call names and numbers, used by
.BR getrpcbyname (3)
and related functions.
.TP
.B services
Network services, used by
.BR getservent (3)
and related functions.
.TP
.B shadow
Shadow user passwords, used by
.BR getspnam (3)
and related functions.
.RE
.LP
Here is an example
.I /etc/nsswitch.conf
file:
.LP
.RS 4
.PD 0
.TP 16
passwd:
compat
.TP
group:
compat
.TP
shadow:
compat
.sp 1n
.TP
hosts:
dns [!UNAVAIL=return] files
.TP
networks:
nis [NOTFOUND=return] files
.TP
ethers:
nis [NOTFOUND=return] files
.TP
protocols:
nis [NOTFOUND=return] files
.TP
rpc:
nis [NOTFOUND=return] files
.TP
services:
nis [NOTFOUND=return] files
.PD
.RE
.LP
The first column is the database name.
The remaining columns specify:
.RS 4
.TP 3
*
One or more service specifications, e.g. "files", "db", or "nis".
The order of the services on the line determines the order in which
those services will be queried, in turn, until a result is found.
.TP
*
Optional actions to perform if a particular result is obtained
from the preceding service, e.g. "[NOTFOUND=return]".
.RE
.LP
The service specifications supported on your system depend on the
presence of shared libraries, and are therefore extensible.
Libraries called
.IB /lib/libnss_SERVICE.so. X
will provide the named
.IR SERVICE .
On a standard installation, you can use
"files", "db", "nis", and "nisplus".
For the
.B hosts
database, you can additionally specify "dns".
For the
.BR passwd ,
.BR group ,
and
.BR shadow
databases, you can additionally specify
"compat" (see
.B "Compatibility mode"
below).
The version number
.B X
may be 1 for glibc 2.0, or 2 for glibc 2.1 and later.
On systems with additional libraries installed, you may have access to
further services such as "hesiod", "ldap", "winbind" and "wins".
.LP
An action may also be specified following a service specification.
The action modifies the behaviour following a result obtained
from the preceding data source.
Action items take the general form:
.LP
.RS 4
.RI [ STATUS = ACTION ]
.br
.RI [! STATUS = ACTION ]
.RE
.LP
where
.LP
.RS 4
.I STATUS
=>
.B success
|
.B notfound
|
.B unavail
|
.B tryagain
.br
.I ACTION
=>
.B return
|
.B continue
.RE
.LP
The ! negates the test, matching all possible results except the
one specified.
The case of the keywords is not significant.
.LP
The
.I STATUS
value is matched against the result of the lookup function called by
the preceding service specification, and can be one of:
.RS 4
.TP 12
.B success
No error occurred and the requested entry is returned.
The default action for this condition is "return".
.TP
.B notfound
The lookup succeeded, but the requested entry was not found.
The default action for this condition is "continue".
.TP
.B unavail
The service is permanently unavailable.
This can mean either that the
required file cannot be read, or, for network services, that the server
is not available or does not allow queries.
The default action for this condition is "continue".
.TP
.B tryagain
The service is temporarily unavailable.
This could mean a file is
locked or a server currently cannot accept more connections.
The default action for this condition is "continue".
.RE
.LP
The
.I ACTION
value can be one of:
.RS 4
.TP 12
.B return
Return a result now.
Do not call any further lookup functions.
.TP
.B continue
Call the next lookup function.
.RE
.SS Compatibility mode (compat)
The NSS "compat" service is similar to "files" except that it
additionally permits special entries in
.I /etc/passwd
for granting users or members of netgroups access to the system.
The following entries are valid in this mode:
.RS 4
.TP 12
.BI + user
Include the specified
.I user
from the NIS passwd map.
.TP
.BI +@ netgroup
Include all users in the given
.IR netgroup .
.TP
.BI \- user
Exclude the specified
.I user
from the NIS passwd map.
.TP
.BI \-@ netgroup
Exclude all users in the given
.IR netgroup .
.TP
.B +
Include every user, except previously excluded ones, from the
NIS passwd map.
.RE
.LP
By default the source is "nis", but this may be
overridden by specifying "nisplus" as the source for the pseudo-databases
.BR passwd_compat ,
.B group_compat
and
.BR shadow_compat .
.SH FILES
A service named
.I SERVICE
is implemented by a shared object library named
.IB libnss_SERVICE.so. X
that resides in
.IR /lib .
.RS 4
.TP 25
.PD 0
.I /etc/nsswitch.conf
NSS configuration file.
.TP
.IB /lib/libnss_compat.so. X
implements "compat" source.
.TP
.IB /lib/libnss_db.so. X
implements "db" source.
.TP
.IB /lib/libnss_dns.so. X
implements "dns" source.
.TP
.IB /lib/libnss_files.so. X
implements "files" source.
.TP
.IB /lib/libnss_hesiod.so. X
implements "hesiod" source.
.TP
.IB /lib/libnss_nis.so. X
implements "nis" source.
.TP
.IB /lib/libnss_nisplus.so. X
implements "nisplus" source.
.PD
.RE
.SH NOTES
Within each process that uses
.BR nsswitch.conf ,
the entire file is read only once.
If the file is later changed, the
process will continue using the old configuration.
.LP
Traditionally there was only a single source for service information,
often in the form of a single configuration
file (e.g. \fI/etc/passwd\fP).
However, as other name services, such as the Network Information
Service (NIS) and the Domain Name Service (DNS), became popular,
a method was needed
that would be more flexible than fixed search orders coded into
the C library.
The Name Service Switch mechanism,
based on the mechanism used by Sun Microsystems in the Solaris 2 C library,
introduced a cleaner solution to the problem.
.SH SEE ALSO
.BR getent (1),
.BR nss (5)
Quoted 27 lines · Mark R Bannister
Quoted 26 lines · Michael Kerrisk (man-pages)
Quoted 22 lines · Mark R Bannister
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
A web version of the man page is available here for proof reading:
http://prose.sourceforge.net/man/linux/nsswitch.conf.5.htmlA patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Quoted 8 lines
Quoted 3 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
Quoted 7 lines
Quoted 2 lines
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks, Michael
Hi Michael,
It's hard to know what exactly we're talking about here because your light edits were not supplied in a way that could easily be reviewed. In fact, I had to diff the two to find out what you had edited.
I suggest the best approach is for you to apply my original patch unedited, then submit to this list a new patch with your suggested edits. Then it will be easier for us to discuss which edits I didn't believe were correct or necessary, and others would also have transparency and be able to comment if they wished too.
Could you do that?
Thanks,
Mark.
-------- Original Message --------
From: "Michael Kerrisk (man-pages)" <[email protected]>
Sent: Fri Mar 30 00:22:24 GMT+01:00 2012
To: Mark R Bannister <mark-/[email protected]>
Cc: [email protected]
Subject: Re: [patch] nsswitch.conf.5: update for readability and latest glibc
Quoted 27 lines · Mark R Bannister
Quoted 26 lines · Michael Kerrisk (man-pages)
Quoted 22 lines · Mark R Bannister
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
A web version of the man page is available here for proof reading:
http://prose.sourceforge.net/man/linux/nsswitch.conf.5.htmlA patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Quoted 8 lines
Quoted 3 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks,
Michael
Signature · 5 lines
Sent from my HTC -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Mark,
Quoted 14 lines · Mark R Bannister
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
Quoted 7 lines
Quoted 2 lines
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks, Michael
Quoted 5 lines
Hi Michael,
It's hard to know what exactly we're talking about here because your light edits were not supplied in a way that could easily be reviewed. In fact, I had to diff the two to find out what you had edited.
I understand what you mean. The problem is that while the edits were light, they touched a lot of lines (adding commas, changing formatting to be consistent with other man pages, modifying a few wordings, reordering some text, rewrapping some source lines), and so the diff was nearly as long as the page itself. So, it seemed simplest just to give you the revised page, and allow you to read it fresh.
Quoted 5 lines
I suggest the best approach is for you to apply my original patch unedited, then submit to this list a new patch with your suggested edits. Then it will be easier for us to discuss which edits I didn't believe were correct or necessary, and others would also have transparency and be able to comment if they wished too.
Okay.
Regarding addition of commas, changes of formatting, and so on, keep this in mind: my "big picture" is to try to have some consistency across man pages. You might have different ideas on some points, but I'm very interested in consistency across pages (and I do have quite a lot of experience of coy-editing and being copy-edited).
Patch below.
Cheers,
Michael
man5/nsswitch.conf.5 +56 -64
@@ -18,31 +18,30 @@ .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free -.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, -.\" USA. +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +.\" MA 02111, USA. .\" -.TH NSSWITCH.CONF 5 2011-10-13 "Linux" "Linux Programmer's Manual" +.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual" .SH NAME nsswitch.conf \- Name Service Switch configuration file .SH DESCRIPTION The .I /etc/nsswitch.conf -file is a configuration file used by the GNU C Library to determine from -what sources to obtain name service information in a range of categories, +("Name Server Switch", NSS) +file is a configuration file used by the GNU C Library to determine +the sources from which to obtain name-service information in +a range of categories, and in what order. Each category of information is identified by a database name. .LP The file is plain ASCII text, with columns separated by spaces or tab characters. -The first column defines the database name. +The first column specifies the database name. The remaining columns describe the order of sources to query and a -limited -set of actions that can be performed by lookup result. +limited set of actions that can be performed by lookup result. .LP -The following databases are made available by the standard -GNU C Library: -.RS 3 -.TP 10 +The following databases are understood by the GNU C Library: +.TP 12 .B aliases Mail aliases, used by .BR getaliasent (3)
@@ -62,8 +61,8 @@ Host names and numbers, used by and related functions. .TP .B netgroup -Network wide list of hosts and users, used for access rules. -C libraries before glibc 2.1 only supported netgroups over NIS. +Network-wide list of hosts and users, used for access rules. +C libraries before glibc 2.1 supported netgroups only over NIS. .TP .B networks Network names and numbers, used by
@@ -97,13 +96,12 @@ and related functions. Shadow user passwords, used by .BR getspnam (3) and related functions. -.RE .LP Here is an example .I /etc/nsswitch.conf file: .LP -.RS 3 +.RS 4 .PD 0 .TP 16 passwd:
@@ -138,16 +136,13 @@ nis [NOTFOUND=return] files .LP The first column is the database name. The remaining columns specify: -.RS 3 -.TP 3 -o -One or more service specifications e.g. "files", "db", or "nis". -The order the services appear on the line determine the order in which +.IP * 3 +One or more service specifications e.g., "files", "db", or "nis". +The order of the services on the line determines the order in which those services will be queried, in turn, until a result is found. -.TP -o +.IP * Optional actions to perform if a particular result is obtained -from the preceding service, e.g. "[NOTFOUND=return]". +from the preceding service, e.g., "[NOTFOUND=return]". .RE .LP The service specifications supported on your system depend on the
@@ -158,8 +153,15 @@ will provide the named .IR SERVICE . On a standard installation, you can use "files", "db", "nis", and "nisplus". -For the hosts database, you can additionally specify "dns". -For the passwd, group, and shadow databases, you can additionally specify +For the +.B hosts +database, you can additionally specify "dns". +For the +.BR passwd , +.BR group , +and +.BR shadow +databases, you can additionally specify "compat" (see .B "Compatibility mode" below).
@@ -169,28 +171,20 @@ may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. On systems with additional libraries installed, you may have access to further services such as "hesiod", "ldap", "winbind" and "wins". .LP -An action may also be specified following a service specification, that -modifies behaviour following a result obtained from the preceding data -source. +An action may also be specified following a service specification. +The action modifies the behaviour following a result obtained +from the preceding data source. Action items take the general form: .LP -.RS 3 -[ -.I STATUS -= -.I ACTION -] +.RS 4 +.RI [ STATUS = ACTION ] .br -[ ! -.I STATUS -= -.I ACTION -] +.RI [! STATUS = ACTION ] .RE .LP where .LP -.RS 3 +.RS 4 .I STATUS => .B success
@@ -210,14 +204,14 @@ where .LP The ! negates the test, matching all possible results except the one specified. -The case of the keywords is insignificant. +The case of the keywords is not significant. .LP The .I STATUS value is matched against the result of the lookup function called by the preceding service specification, and can be one of: -.RS 3 -.TP 10 +.RS 4 +.TP 12 .B success No error occurred and the requested entry is returned. The default action for this condition is "return".
@@ -228,8 +222,8 @@ The default action for this condition is "continue". .TP .B unavail The service is permanently unavailable. -This can either mean the -required file cannot be read, or, for network services, the server +This can mean either that the +required file cannot be read, or, for network services, that the server is not available or does not allow queries. The default action for this condition is "continue". .TP
@@ -243,8 +237,8 @@ The default action for this condition is "continue". The .I ACTION value can be one of: -.RS 3 -.TP 10 +.RS 4 +.TP 12 .B return Return a result now. Do not call any further lookup functions.
@@ -258,7 +252,7 @@ additionally permits special entries in .I /etc/passwd for granting users or members of netgroups access to the system. The following entries are valid in this mode: -.RS 3 +.RS 4 .TP 12 .BI + user Include the specified
@@ -279,14 +273,14 @@ Exclude all users in the given .IR netgroup . .TP .B + -Include every user, except previously excluded ones, in the +Include every user, except previously excluded ones, from the NIS passwd map. .RE .LP By default the source is "nis", but this may be -overridden by specifying "nisplus" as source for the pseudo-databases +overridden by specifying "nisplus" as the source for the pseudo-databases .BR passwd_compat , -.B group_compat +.BR group_compat , and .BR shadow_compat . .SH FILES
@@ -296,7 +290,7 @@ is implemented by a shared object library named .IB libnss_SERVICE.so. X that resides in .IR /lib . -.RS 3 +.RS 4 .TP 25 .PD 0 .I /etc/nsswitch.conf
@@ -324,9 +318,6 @@ implements "nis" source. implements "nisplus" source. .PD .RE -.SH SEE ALSO -.BR getent (1), -.BR nss (5). .SH NOTES Within each process that uses .BR nsswitch.conf ,
@@ -334,16 +325,17 @@ the entire file is read only once. If the file is later changed, the process will continue using the old configuration. .LP -Traditionally there was only a single source for service information, +Traditionally, there was only a single source for service information, often in the form of a single configuration -file (e.g. \fI/etc/passwd\fP). -However, as other nameservices, like the Network Information +file (e.g., \fI/etc/passwd\fP). +However, as other name services, such as the Network Information Service (NIS) and the Domain Name Service (DNS), became popular, a method was needed that would be more flexible than fixed search orders coded into the C library. -.LP -The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) -introduced a cleaner solution to the problem, based on the -.B "Name Service Switch" -mechanism used by Sun Microsystems in the Solaris 2 C library. +The Names Server Switch mechanism +(based on the mechanism used by Sun Microsystems in the Solaris 2 C library) +introduced a cleaner solution to the problem. +.SH SEE ALSO +.BR getent (1), +.BR nss (5)
Quoted 56 lines
-------- Original Message --------
From: "Michael Kerrisk (man-pages)" <[email protected]>
Sent: Fri Mar 30 00:22:24 GMT+01:00 2012
To: Mark R Bannister <mark-/[email protected]>
Cc: [email protected]
Subject: Re: [patch] nsswitch.conf.5: update for readability and latest glibcQuoted 27 lines · Mark R Bannister
Quoted 26 lines · Michael Kerrisk (man-pages)
Quoted 22 lines · Mark R Bannister
Hi,
This patch applies to nsswitch.conf.5 in man-pages-3.36.
My changes almost completely rewrite large sections of the man page. They are needed to add clarity, correct grammar, reduce confusion, and bring up-to-date with the latest glibc. I have checked the man page against the nss source code in glibc 2.14.90.
Historical notes are demoted to the footer.
I believe the rewrite makes the man page much clearer to understand, more authoratitive and easier to read.
A web version of the man page is available here for proof reading:
http://prose.sourceforge.net/man/linux/nsswitch.conf.5.htmlA patch is copied below, and also attached to this message.
I am happy for my work to be released under the terms of the GNU General Public License.
Quoted 8 lines
Quoted 3 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks,
Michael
--
Sent from my HTC
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 32 lines · Michael Kerrisk (man-pages)
Hi Mark,
Quoted 11 lines · Mark R Bannister
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter some of your light edits. Latest version below and attached.
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks, MichaelQuoted 5 lines
Hi Michael,
It's hard to know what exactly we're talking about here because your light edits were not supplied in a way that could easily be reviewed. In fact, I had to diff the two to find out what you had edited.
I understand what you mean. The problem is that while the edits were light, they touched a lot of lines (adding commas, changing formatting to be consistent with other man pages, modifying a few wordings, reordering some text, rewrapping some source lines), and so the diff was nearly as long as the page itself. So, it seemed simplest just to give you the revised page, and allow you to read it fresh.
Quoted 5 lines
I suggest the best approach is for you to apply my original patch unedited, then submit to this list a new patch with your suggested edits. Then it will be easier for us to discuss which edits I didn't believe were correct or necessary, and others would also have transparency and be able to comment if they wished too.
Quoted 7 lines
Okay.
Regarding addition of commas, changes of formatting, and so on, keep this in mind: my "big picture" is to try to have some consistency across man pages. You might have different ideas on some points, but I'm very interested in consistency across pages (and I do have quite a lot of experience of coy-editing and being copy-edited).
Hi Michael,
Sorry for the delay in replying. Thanks for sending the patch, my comments are in-line below.
Quoted 12 lines
Patch below.
Cheers,
Michael
man5/nsswitch.conf.5 +0
-0
man5/nsswitch.conf.5 line 22
Quoted 7 lines
man5/nsswitch.conf.5 +2
-2@@ -18,31 +18,30 @@ .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free -.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, -.\" USA. +.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +.\" MA 02111, USA.
np
man5/nsswitch.conf.5 line 24
Quoted 3 lines
man5/nsswitch.conf.5 +1
-1.\" -.TH NSSWITCH.CONF 5 2011-10-13 "Linux" "Linux Programmer's Manual" +.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual"
np
man5/nsswitch.conf.5 line 30
Quoted 8 lines
man5/nsswitch.conf.5 +1
-2.SH NAME nsswitch.conf \- Name Service Switch configuration file .SH DESCRIPTION The .I /etc/nsswitch.conf -file is a configuration file used by the GNU C Library to determine from -what sources to obtain name service information in a range of categories, +("Name Server Switch", NSS)
Unnecessary, not good grammar and incorrect to insert this text in parentheses. Unnecessary because we mention it in the NOTES section below, not good grammar on several counts not least of which because it interrupts the fluency of the sentence, and incorrect because NSS stands for "Name Service Switch" not "Name Server Switch", nor "Names Server Switch" as you have it later on. As I also mention later on, I'm not a big fan of using parentheses in the middle of sentences, especially when a perfectly good sentence can be constructed without. This isn't a shell script.
man5/nsswitch.conf.5 line 32
Quoted 2 lines
man5/nsswitch.conf.5 +2
-0+file is a configuration file used by the GNU C Library to determine +the sources from which to obtain name-service information in
np except that "name service" does not need hyphenation. We don't hyphenate it anywhere else in the page, so don't need to here.
man5/nsswitch.conf.5 line 39
Quoted 8 lines
man5/nsswitch.conf.5 +2
-1+a range of categories, and in what order. Each category of information is identified by a database name. .LP The file is plain ASCII text, with columns separated by spaces or tab characters. -The first column defines the database name. +The first column specifies the database name.
np
man5/nsswitch.conf.5 line 40
Quoted 3 lines
man5/nsswitch.conf.5 +0
-2The remaining columns describe the order of sources to query and a -limited -set of actions that can be performed by lookup result.
np
man5/nsswitch.conf.5 line 44
Quoted 8 lines
man5/nsswitch.conf.5 +3
-4+limited set of actions that can be performed by lookup result. .LP -The following databases are made available by the standard -GNU C Library: -.RS 3 -.TP 10 +The following databases are understood by the GNU C Library: +.TP 12
The way you format tables and lists, left flush with no indentation, is not easy to read. I prefer all my lists to be indented, which makes the page easier to read. If any list is going to be indented, they all should be, and to the same level. So this comment applies to all your RS, TP and RE changes below as well.
man5/nsswitch.conf.5 Host names and numbers, used by · line 65
Quoted 11 lines
man5/nsswitch.conf.5 +2
-2.B aliases Mail aliases, used by .BR getaliasent (3)@@ -62,8 +61,8 @@ Host names and numbers, used by and related functions. .TP .B netgroup -Network wide list of hosts and users, used for access rules. -C libraries before glibc 2.1 only supported netgroups over NIS. +Network-wide list of hosts and users, used for access rules. +C libraries before glibc 2.1 supported netgroups only over NIS.
np
Quoted 20 lines
man5/nsswitch.conf.5 +1
-2.TP .B networks Network names and numbers, used by@@ -97,13 +96,12 @@ and related functions. Shadow user passwords, used by .BR getspnam (3) and related functions. -.RE .LP Here is an example .I /etc/nsswitch.conf file: .LP -.RS 3 +.RS 4 .PD 0 .TP 16 passwd:@@ -138,16 +136,13 @@ nis [NOTFOUND=return] files .LP
man5/nsswitch.conf.5 nis [NOTFOUND=return] files · line 141
Quoted 10 lines
man5/nsswitch.conf.5 +3
-5The first column is the database name. The remaining columns specify: -.RS 3 -.TP 3 -o -One or more service specifications e.g. "files", "db", or "nis". -The order the services appear on the line determine the order in which +.IP * 3 +One or more service specifications e.g., "files", "db", or "nis". +The order of the services on the line determines the order in which
np
man5/nsswitch.conf.5 nis [NOTFOUND=return] files · line 145
Quoted 7 lines
man5/nsswitch.conf.5 +2
-3those services will be queried, in turn, until a result is found. -.TP -o +.IP * Optional actions to perform if a particular result is obtained -from the preceding service, e.g. "[NOTFOUND=return]". +from the preceding service, e.g., "[NOTFOUND=return]".
A comma after a dot is redundant. This applies to all cases where you have changed "e.g." to "e.g.,". Mind you, a little research revealed: http://dictionary.reference.com/help/faq/language/g58.html which I had not previously been aware of.
I write British English.
Quoted 8 lines
man5/nsswitch.conf.5 +0
-1.RE .LP The service specifications supported on your system depend on the@@ -158,8 +153,15 @@ will provide the named .IR SERVICE . On a standard installation, you can use "files", "db", "nis", and "nisplus". -For the hosts database, you can additionally specify "dns".
man5/nsswitch.conf.5 will provide the named · line 164
Quoted 10 lines
man5/nsswitch.conf.5 +9
-1-For the passwd, group, and shadow databases, you can additionally specify +For the +.B hosts +database, you can additionally specify "dns". +For the +.BR passwd , +.BR group , +and +.BR shadow +databases, you can additionally specify
np
man5/nsswitch.conf.5 may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. · line 176
Quoted 13 lines
man5/nsswitch.conf.5 +3
-3"compat" (see .B "Compatibility mode" below).@@ -169,28 +171,20 @@ may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. On systems with additional libraries installed, you may have access to further services such as "hesiod", "ldap", "winbind" and "wins". .LP -An action may also be specified following a service specification, that -modifies behaviour following a result obtained from the preceding data -source. +An action may also be specified following a service specification. +The action modifies the behaviour following a result obtained +from the preceding data source.
np
man5/nsswitch.conf.5 may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. · line 180
Quoted 11 lines
man5/nsswitch.conf.5 +2
-6Action items take the general form: .LP -.RS 3 -[ -.I STATUS -= -.I ACTION -] +.RS 4 +.RI [ STATUS = ACTION ]
np
man5/nsswitch.conf.5 may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. · line 182
Quoted 7 lines
man5/nsswitch.conf.5 +1
-5.br -[ ! -.I STATUS -= -.I ACTION -] +.RI [! STATUS = ACTION ]
np
Quoted 10 lines
man5/nsswitch.conf.5 +1
-1.RE .LP where .LP -.RS 3 +.RS 4 .I STATUS =>.B success
man5/nsswitch.conf.5 where · line 207
Quoted 5 lines
man5/nsswitch.conf.5 +1
-1@@ -210,14 +204,14 @@ where .LP The ! negates the test, matching all possible results except the one specified. -The case of the keywords is insignificant. +The case of the keywords is not significant.
np
Quoted 13 lines
man5/nsswitch.conf.5 +2
-2.LP The .I STATUS value is matched against the result of the lookup function called by the preceding service specification, and can be one of: -.RS 3 -.TP 10 +.RS 4 +.TP 12 .B success No error occurred and the requested entry is returned. The default action for this condition is "return".
man5/nsswitch.conf.5 The default action for this condition is "continue". · line 226
Quoted 7 lines
man5/nsswitch.conf.5 +2
-2@@ -228,8 +222,8 @@ The default action for this condition is "continue". .TP .B unavail The service is permanently unavailable. -This can either mean the -required file cannot be read, or, for network services, the server +This can mean either that the +required file cannot be read, or, for network services, that the server
np
Quoted 24 lines
man5/nsswitch.conf.5 +3
-3is not available or does not allow queries. The default action for this condition is "continue". .TP@@ -243,8 +237,8 @@ The default action for this condition is "continue". The .I ACTION value can be one of: -.RS 3 -.TP 10 +.RS 4 +.TP 12 .B return Return a result now. Do not call any further lookup functions.@@ -258,7 +252,7 @@ additionally permits special entries in .I /etc/passwd for granting users or members of netgroups access to the system. The following entries are valid in this mode: -.RS 3 +.RS 4 .TP 12 .BI + user Include the specified
man5/nsswitch.conf.5 Exclude all users in the given · line 276
Quoted 5 lines
man5/nsswitch.conf.5 +1
-1@@ -279,14 +273,14 @@ Exclude all users in the given .IR netgroup . .TP .B + -Include every user, except previously excluded ones, in the +Include every user, except previously excluded ones, from the
np
man5/nsswitch.conf.5 Exclude all users in the given · line 281
Quoted 6 lines
man5/nsswitch.conf.5 +1
-1NIS passwd map. .RE .LP By default the source is "nis", but this may be -overridden by specifying "nisplus" as source for the pseudo-databases +overridden by specifying "nisplus" as the source for the pseudo-databases
np
man5/nsswitch.conf.5 Exclude all users in the given · line 283
Quoted 3 lines
man5/nsswitch.conf.5 +1
-1.BR passwd_compat , -.B group_compat +.BR group_compat ,
A comma before "and" is generally not good grammar unless the sentence is complex and the extra pauses help the reader. In this case the sentence is short and the comma you've inserted adds no extra clarity.
Quoted 23 lines
man5/nsswitch.conf.5 +1
-4and .BR shadow_compat . .SH FILES@@ -296,7 +290,7 @@ is implemented by a shared object library named .IB libnss_SERVICE.so. X that resides in .IR /lib . -.RS 3 +.RS 4 .TP 25 .PD 0 .I /etc/nsswitch.conf@@ -324,9 +318,6 @@ implements "nis" source. implements "nisplus" source. .PD .RE -.SH SEE ALSO -.BR getent (1), -.BR nss (5). .SH NOTES Within each process that uses .BR nsswitch.conf ,
man5/nsswitch.conf.5 the entire file is read only once. · line 328
Quoted 5 lines
man5/nsswitch.conf.5 +1
-1@@ -334,16 +325,17 @@ the entire file is read only once. If the file is later changed, the process will continue using the old configuration. .LP -Traditionally there was only a single source for service information, +Traditionally, there was only a single source for service information,
Redundant comma.
man5/nsswitch.conf.5 the entire file is read only once. · line 330
Quoted 4 lines
man5/nsswitch.conf.5 +1
-2often in the form of a single configuration -file (e.g. \fI/etc/passwd\fP). -However, as other nameservices, like the Network Information +file (e.g., \fI/etc/passwd\fP).
E.g. discussion above.
man5/nsswitch.conf.5 the entire file is read only once. · line 331
Quoted 1 line
man5/nsswitch.conf.5 +1
-0+However, as other name services, such as the Network Information
np
man5/nsswitch.conf.5 the entire file is read only once. · line 336
Quoted 10 lines
man5/nsswitch.conf.5 +1
-5Service (NIS) and the Domain Name Service (DNS), became popular, a method was needed that would be more flexible than fixed search orders coded into the C library. -.LP -The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) -introduced a cleaner solution to the problem, based on the -.B "Name Service Switch" -mechanism used by Sun Microsystems in the Solaris 2 C library. +The Names Server Switch mechanism
"Name Service Switch" is correct. "Names Server Switch" is incorrect.
man5/nsswitch.conf.5 the entire file is read only once. · line 337
Quoted 1 line
man5/nsswitch.conf.5 +1
-0+(based on the mechanism used by Sun Microsystems in the Solaris 2 C library)
I don't like the use of parentheses. If one can write a good sentence without using them, more the better. So editing a sentence that didn't need to use parentheses, and adding them in, is not going to get my vote.
man5/nsswitch.conf.5 the entire file is read only once. · line 341
Quoted 6 lines
man5/nsswitch.conf.5 +4
-0+introduced a cleaner solution to the problem. +.SH SEE ALSO +.BR getent (1), +.BR nss (5)
np moving SEE ALSO to end.
I hope you understand now which edits I had no problem with. A large number of your edits were not controversial and I agree with. You can now see the handful of edits that I disagreed with.
Best regards,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Michael Kerrisk (man-pages)
AppliedHi Mark,
Quoted 55 lines · Mark R Bannister
Quoted 41 lines · Michael Kerrisk (man-pages)
Hi Mark,
Quoted 17 lines · Mark R Bannister
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines
Thanks Mark. This looks good. I've done some light edits. Could you please review the below (also attached).
Hi Michael,
I've reviewed your edits. They're almost all good, but I've had to counter
some of your light edits. Latest version below and attached.Quoted 5 lines
Hi Mark,
Can you explain your changes? It looks like they mostly revert my additions of commas and formatting consistency with other pages. Why?
Thanks, MichaelQuoted 5 lines
Hi Michael,
It's hard to know what exactly we're talking about here because your light edits were not supplied in a way that could easily be reviewed. In fact, I had to diff the two to find out what you had edited.
I understand what you mean. The problem is that while the edits were light, they touched a lot of lines (adding commas, changing formatting to be consistent with other man pages, modifying a few wordings, reordering some text, rewrapping some source lines), and so the diff was nearly as long as the page itself. So, it seemed simplest just to give you the revised page, and allow you to read it fresh.
Quoted 5 lines
I suggest the best approach is for you to apply my original patch unedited, then submit to this list a new patch with your suggested edits. Then it will be easier for us to discuss which edits I didn't believe were correct or necessary, and others would also have transparency and be able to comment if they wished too.
Quoted 7 lines
Okay.
Regarding addition of commas, changes of formatting, and so on, keep this in mind: my "big picture" is to try to have some consistency across man pages. You might have different ideas on some points, but I'm very interested in consistency across pages (and I do have quite a lot of experience of coy-editing and being copy-edited).
Hi Michael,
Sorry for the delay in replying. Thanks for sending the patch, my comments are in-line below.
[...]
Quoted 26 lines
Quoted 5 lines
man5/nsswitch.conf.5 +0
-0@@ -18,31 +18,30 @@Quoted 8 lines
.\"
.\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free -.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +.\" MA 02111, USA.np
Quoted 3 lines
.\"
-.TH NSSWITCH.CONF 5 2011-10-13 "Linux" "Linux Programmer's Manual" +.TH NSSWITCH.CONF 5 2012-03-29 "Linux" "Linux Programmer's Manual"np
Quoted 15 lines
man5/nsswitch.conf.5 line 30
Quoted 8 lines
.SH NAME
nsswitch.conf \- Name Service Switch configuration file .SH DESCRIPTION
The
.I/etc/nsswitch.confman5/nsswitch.conf.5 +1
-2-file is a configuration file used by the GNU C Library to determine from -what sources to obtain name service information in a range of categories, +("Name Server Switch", NSS)Unnecessary, not good grammar and incorrect to insert this text in parentheses. Unnecessary because we mention it in the NOTES section below, not good grammar on several counts not least of which because it interrupts the fluency of the sentence, and incorrect because NSS stands for "Name Service Switch" not "Name Server Switch", nor "Names Server Switch" as you
D'oh. Those were thinkos on my part!
Quoted 3 lines
have it later on. As I also mention later on, I'm not a big fan of using parentheses in the middle of sentences, especially when a perfectly good sentence can be constructed without. This isn't a shell script.
My addition of the parenthetical text here was to address the problem that later in the page, the undefined abbreviation "NSS" is used. I'll rewrite the start of that sentence as:
==
The Name Service Switch (NSS) configuration file,
.IR /etc/nsswitch.conf ,
is used by the GNU C Library to determine
==
Quoted 5 lines
man5/nsswitch.conf.5 line 32
Quoted 2 lines
man5/nsswitch.conf.5 +2
-0+file is a configuration file used by the GNU C Library to determine +the sources from which to obtain name-service information innp except that "name service" does not need hyphenation. We don't hyphenate it anywhere else in the page, so don't need to here.
See http://en.wikipedia.org/wiki/Compound_modifier#Hyphenation_of_elements
Quoted 22 lines
man5/nsswitch.conf.5 line 39
Quoted 9 lines
+a range of categories,
and in what order.
Each category of information is identified by a database name. .LP
The file is plain ASCII text, with columns separated by spaces or tab characters.man5/nsswitch.conf.5 +1
-1-The first column defines the database name. +The first column specifies the database name.np
man5/nsswitch.conf.5 line 40
Quoted 3 lines
The remaining columns describe the order of sources to query and a
man5/nsswitch.conf.5 +0
-2-limited -set of actions that can be performed by lookup result.np
Quoted 15 lines
man5/nsswitch.conf.5 line 44
Quoted 8 lines
+limited set of actions that can be performed by lookup result. .LP
man5/nsswitch.conf.5 +2
-4-The following databases are made available by the standard -GNU C Library: -.RS 3 -.TP 10 +The following databases are understood by the GNU C Library: +.TP 12The way you format tables and lists, left flush with no indentation, is not easy to read. I prefer all my lists to be indented, which makes the page easier to read. If any list is going to be indented, they all should be, and to the same level. So this comment applies to all your RS, TP and RE changes below as well.
Of course there's room for debate here, but the rationale is this:
1. Consistent formatting across pages
2. We only have 80 columns (less on some displays), so do not be too profligate with left indents.
Quoted 65 lines
man5/nsswitch.conf.5 Host names and numbers, used by · line 65
Quoted 11 lines
.B aliases
Mail aliases, used by
.BR getaliasent (3)man5/nsswitch.conf.5 +0
-0@@ -62,8 +61,8 @@ Host names and numbers, used byand related functions.
.TP
.B netgroupman5/nsswitch.conf.5 +2
-2-Network wide list of hosts and users, used for access rules. -C libraries before glibc 2.1 only supported netgroups over NIS. +Network-wide list of hosts and users, used for access rules. +C libraries before glibc 2.1 supported netgroups only over NIS.np
Quoted 24 lines
.TP
.B networks
Network names and numbers, used byman5/nsswitch.conf.5 +0
-0@@ -97,13 +96,12 @@ and related functions.Shadow user passwords, used by
.BR getspnam (3)
and related functions.
-.RE
.LP
Here is an example
.I/etc/nsswitch.conf
file:
.LP
-.RS 3
+.RS 4
.PD 0
.TP 16
passwd:man5/nsswitch.conf.5 +0
-0@@ -138,16 +136,13 @@ nis [NOTFOUND=return] files.LP
The first column is the database name.
The remaining columns specify:
-.RS 3
-.TP 3man5/nsswitch.conf.5 nis [NOTFOUND=return] files · line 141
Quoted 6 lines
man5/nsswitch.conf.5 +3
-3-o -One or more service specifications e.g. "files", "db", or "nis". -The order the services appear on the line determine the order in which +.IP * 3 +One or more service specifications e.g., "files", "db", or "nis". +The order of the services on the line determines the order in whichnp
man5/nsswitch.conf.5 nis [NOTFOUND=return] files · line 145
Quoted 7 lines
those services will be queried, in turn, until a result is found. -.TP
-o
+.IP *
Optional actions to perform if a particular result is obtainedman5/nsswitch.conf.5 +1
-1-from the preceding service, e.g. "[NOTFOUND=return]". +from the preceding service, e.g., "[NOTFOUND=return]".A comma after a dot is redundant. This applies to all cases where you have changed "e.g." to "e.g.,". Mind you, a little research revealed:
http://dictionary.reference.com/help/faq/language/g58.html which I had not previously been aware of.
Quoted 1 line
I write British English.
Yes, there's regional variation here. Oxford Style Manual omits the comma. Chicago MOS uses it. Man-pages generally follows American usage (spelling, etc.).
Quoted 23 lines
Quoted 8 lines
.RE
.LP
The service specifications supported on your system depend on theman5/nsswitch.conf.5 +0
-0@@ -158,8 +153,15 @@ will provide the named.IR SERVICE .
On a standard installation, you can use
"files", "db", "nis", and "nisplus".man5/nsswitch.conf.5 +0
-1-For the hosts database, you can additionally specify "dns".man5/nsswitch.conf.5 will provide the named · line 164
Quoted 10 lines
man5/nsswitch.conf.5 +9
-1-For the passwd, group, and shadow databases, you can additionally specify +For the +.B hosts +database, you can additionally specify "dns". +For the +.BR passwd , +.BR group , +and +.BR shadow +databases, you can additionally specifynp
Quoted 13 lines
man5/nsswitch.conf.5 may be 1 for glibc 2.0, or 2 for glibc 2.1 and later. · line 175
Quoted 13 lines
"compat" (see
.B "Compatibility mode"
below).man5/nsswitch.conf.5 +0
-0@@ -169,28 +171,20 @@ may be 1 for glibc 2.0, or 2 for glibc 2.1 andlater.
On systems with additional libraries installed, you may have access to further services such as "hesiod", "ldap", "winbind" and "wins". .LPman5/nsswitch.conf.5 +2
-3-An action may also be specified following a service specification, that -modifies behaviour following a result obtained from the preceding data -source. +An action may also be specified following a service specification. +The action modifies the behaviour following a result obtained
Just spotted this. Should be "behavior".
Quoted 125 lines
Quoted 1 line
+from the preceding data source.
np
Quoted 12 lines
Action items take the general form:
.LP
-.RS 3
-[
-.I STATUS
-=
-.I ACTION
-]
+.RS 4
+.RI [ STATUS = ACTION ]np
Quoted 7 lines
.br
-[ !
-.I STATUS
-=
-.I ACTION
-]
+.RI [! STATUS = ACTION ]np
Quoted 13 lines
.RE
.LP
where
.LP
-.RS 3
+.RS 4
.I STATUS
=>
.B successman5/nsswitch.conf.5 +0
-0@@ -210,14 +204,14 @@ where.LP
The ! negates the test, matching all possible results except the one specified.man5/nsswitch.conf.5 where · line 207
Quoted 2 lines
man5/nsswitch.conf.5 +1
-1-The case of the keywords is insignificant. +The case of the keywords is not significant.np
Quoted 16 lines
.LP
The
.I STATUS
value is matched against the result of the lookup function called by the preceding service specification, and can be one of:
-.RS 3
-.TP 10
+.RS 4
+.TP 12
.B success
No error occurred and the requested entry is returned. The default action for this condition is "return".man5/nsswitch.conf.5 +0
-0@@ -228,8 +222,8 @@ The default action for this condition is "continue"..TP
.B unavail
The service is permanently unavailable.man5/nsswitch.conf.5 The default action for this condition is "continue". · line 226
Quoted 4 lines
man5/nsswitch.conf.5 +2
-2-This can either mean the -required file cannot be read, or, for network services, the server +This can mean either that the +required file cannot be read, or, for network services, that the servernp
Quoted 27 lines
is not available or does not allow queries. The default action for this condition is "continue". .TP
man5/nsswitch.conf.5 +0
-0@@ -243,8 +237,8 @@ The default action for this condition is "continue".The
.I ACTION
value can be one of:
-.RS 3
-.TP 10
+.RS 4
+.TP 12
.B return
Return a result now.
Do not call any further lookup functions.man5/nsswitch.conf.5 +0
-0@@ -258,7 +252,7 @@ additionally permits special entries in.I
/etc/passwd
for granting users or members of netgroups access to the system. The following entries are valid in this mode:
-.RS 3
+.RS 4
.TP 12
.BI + user
Include the specifiedman5/nsswitch.conf.5 +0
-0@@ -279,14 +273,14 @@ Exclude all users in the given.IR netgroup .
.TP
.B +man5/nsswitch.conf.5 Exclude all users in the given · line 276
Quoted 2 lines
man5/nsswitch.conf.5 +1
-1-Include every user, except previously excluded ones, in the +Include every user, except previously excluded ones, from thenp
man5/nsswitch.conf.5 Exclude all users in the given · line 281
Quoted 6 lines
NIS passwd map.
.RE
.LP
By default the source is "nis", but this may beman5/nsswitch.conf.5 +1
-1-overridden by specifying "nisplus" as source for the pseudo-databases +overridden by specifying "nisplus" as the source for the pseudo-databasesnp
Quoted 8 lines
Quoted 3 lines
.BR
passwd_compat,
-.Bgroup_compat
+.BRgroup_compat,A comma before "and" is generally not good grammar unless the sentence is complex and the extra pauses help the reader. In this case the sentence is short and the comma you've inserted adds no extra clarity.
Me and man-pages favor the Oxford comma. It's a stylistic choice. See http://en.wikipedia.org/wiki/Serial_comma
Quoted 23 lines
Quoted 23 lines
and
.BRshadow_compat.
.SH FILESman5/nsswitch.conf.5 +0
-0@@ -296,7 +290,7 @@ is implemented by a shared object library named.IB libnss_SERVICE.so. X
that resides in
.IR /lib .
-.RS 3
+.RS 4
.TP 25
.PD 0
.I/etc/nsswitch.confman5/nsswitch.conf.5 +0
-0@@ -324,9 +318,6 @@ implements "nis" source.implements "nisplus" source.
.PD
.RE
-.SH SEE ALSO
-.BR getent (1),
-.BR nss (5).
.SH NOTES
Within each process that uses
.BR nsswitch.conf ,man5/nsswitch.conf.5 +0
-0@@ -334,16 +325,17 @@ the entire file is read only once.
Quoted 8 lines
man5/nsswitch.conf.5 the entire file is read only once. · line 328
Quoted 5 lines
If the file is later changed, the
process will continue using the old configuration. .LPman5/nsswitch.conf.5 +1
-1-Traditionally there was only a single source for service information, +Traditionally, there was only a single source for service information,Redundant comma.
I would have said "optional" (because the part before the comma is small), and a stylistic choice.
Quoted 15 lines
man5/nsswitch.conf.5 the entire file is read only once. · line 330
Quoted 4 lines
often in the form of a single configuration
man5/nsswitch.conf.5 +1
-2-file (e.g. \fI/etc/passwd\fP). -However, as other nameservices, like the Network Information +file (e.g., \fI/etc/passwd\fP).E.g. discussion above.
Quoted 1 line
+However, as other name services, such as the Network Information
np
Quoted 13 lines
man5/nsswitch.conf.5 the entire file is read only once. · line 336
Quoted 10 lines
Service (NIS) and the Domain Name Service (DNS), became popular, a method was needed
that would be more flexible than fixed search orders coded into the C library.
-.LPman5/nsswitch.conf.5 +1
-4-The Linux libc5 with NYS support and the GNU C Library 2.x (libc.so.6) -introduced a cleaner solution to the problem, based on the -.B "Name Service Switch" -mechanism used by Sun Microsystems in the Solaris 2 C library. +The Names Server Switch mechanism"Name Service Switch" is correct. "Names Server Switch" is incorrect.
Yes, fixed now. Thanks.
Quoted 7 lines
Quoted 2 lines
+(based on the mechanism used by Sun Microsystems in the Solaris 2 C library)
I don't like the use of parentheses. If one can write a good sentence without using them, more the better. So editing a sentence that didn't need to use parentheses, and adding them in, is not going to get my vote.
Yes, stylistically you are probably right. Overuse of parenthesis is one of my writing bad habits that I have trouble to stamp out. I'll make it:
==
The Name Service Switch mechanism,
which was based on the mechanism used by
Sun Microsystems in the Solaris 2 C library,
introduced a cleaner solution to the problem.
==
Quoted 7 lines
Quoted 6 lines
+introduced a cleaner solution to the problem.
+.SH SEE ALSO
+.BR getent (1),
+.BR nss (5)
Quoted 5 lines
np moving SEE ALSO to end.
I hope you understand now which edits I had no problem with. A large number of your edits were not controversial and I agree with. You can now see the handful of edits that I disagreed with.
Okay, thanks Mark.
I've merged this patch now, and pushed to kernel.org git.
Cheers,
Michael
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface"; http://man7.org/tlpi/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html