Deleted Added
full compact
nsswitch.conf.5 (68962) nsswitch.conf.5 (70466)
1.\" $NetBSD: nsswitch.conf.5,v 1.14 1999/03/17 20:19:47 garbled Exp $
1.\" $NetBSD: nsswitch.conf.5,v 1.14 1999/03/17 20:19:47 garbled Exp $
2.\" $FreeBSD: head/share/man/man5/nsswitch.conf.5 68962 2000-11-20 18:41:33Z ru $
2.\" $FreeBSD: head/share/man/man5/nsswitch.conf.5 70466 2000-12-29 09:18:45Z ru $
3.\"
4.\" Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to The NetBSD Foundation
8.\" by Luke Mewburn.
9.\"
10.\" Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

58Each source can have an optional trailing criterion that determines
59whether the next listed source is used, or the search terminates at
60the current source.
61Each criterion consists of one or more status codes, and actions to
62take if that status code occurs.
63.Ss Sources
64The following sources are implemented:
65.Bl -column "compat" -offset indent -compact
3.\"
4.\" Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to The NetBSD Foundation
8.\" by Luke Mewburn.
9.\"
10.\" Redistribution and use in source and binary forms, with or without

--- 47 unchanged lines hidden (view full) ---

58Each source can have an optional trailing criterion that determines
59whether the next listed source is used, or the search terminates at
60the current source.
61Each criterion consists of one or more status codes, and actions to
62take if that status code occurs.
63.Ss Sources
64The following sources are implemented:
65.Bl -column "compat" -offset indent -compact
66.Sy Source Description
67.It files Local files, such as
66.It Sy "Source Description
67.It "files Local files, such as"
68.Pa /etc/hosts ,
69and
70.Pa /etc/passwd .
68.Pa /etc/hosts ,
69and
70.Pa /etc/passwd .
71.It dns Internet Domain Name System.
71.It "dns Internet Domain Name System."
72.Dq hosts
73and
74.Sq networks
75use
76.Sy IN
77class entries, all other databases use
78.Sy HS
79class (Hesiod) entries.
72.Dq hosts
73and
74.Sq networks
75use
76.Sy IN
77class entries, all other databases use
78.Sy HS
79class (Hesiod) entries.
80.It nis NIS (formerly YP)
81.It compat support
80.It "nis NIS (formerly YP)"
81.It "compat support"
82.Sq +/-
83in the
84.Dq passwd
85and
86.Dq group
87databases.
88If this is present, it must be the only source for that entry.
89.El
90.Ss Databases
91The following databases are used by the following C library functions:
92.Bl -column "networks" -offset indent -compact
82.Sq +/-
83in the
84.Dq passwd
85and
86.Dq group
87databases.
88If this is present, it must be the only source for that entry.
89.El
90.Ss Databases
91The following databases are used by the following C library functions:
92.Bl -column "networks" -offset indent -compact
93.Sy Database Used by
94.It group
93.It Sy "Database Used by"
94.It "group "
95.Xr getgrent 3
95.Xr getgrent 3
96.It hosts
96.It "hosts "
97.Xr gethostbyname 3
97.Xr gethostbyname 3
98.It networks
98.It "networks "
99.Xr getnetbyname 3
99.Xr getnetbyname 3
100.It passwd
100.It "passwd "
101.Xr getpwent 3
101.Xr getpwent 3
102.It shells
102.It "shells "
103.Xr getusershell 3
104.El
105.Ss Status codes
106The following status codes are available:
107.Bl -column "tryagain" -offset indent -compact
103.Xr getusershell 3
104.El
105.Ss Status codes
106The following status codes are available:
107.Bl -column "tryagain" -offset indent -compact
108.Sy Status Description
109.It success The requested entry was found.
110.It notfound The entry is not present at this source.
111.It tryagain The source is busy, and may respond to retries.
112.It unavail The source is not responding, or entry is corrupt.
108.It Sy "Status Description"
109.It "success The requested entry was found."
110.It "notfound The entry is not present at this source."
111.It "tryagain The source is busy, and may respond to retries."
112.It "unavail The source is not responding, or entry is corrupt."
113.El
114.Ss Actions
115For each of the status codes, one of two actions is possible:
116.Bl -column "continue" -offset indent -compact
113.El
114.Ss Actions
115For each of the status codes, one of two actions is possible:
116.Bl -column "continue" -offset indent -compact
117.Sy Action Description
118.It continue Try the next source
119.It return Return with the current result
117.It Sy "Action Description"
118.It "continue Try the next source"
119.It "return Return with the current result"
120.El
121.Ss Format of file
122A
123.Tn BNF
124description of the syntax of
125.Nm
126is:
127.Bl -column "<criterion>" -offset indent
120.El
121.Ss Format of file
122A
123.Tn BNF
124description of the syntax of
125.Nm
126is:
127.Bl -column "<criterion>" -offset indent
128.It <entry> ::=
128.It "<entry> ::="
129<database> ":" [<source> [<criteria>]]*
129<database> ":" [<source> [<criteria>]]*
130.It <criteria> ::=
130.It "<criteria> ::="
131"[" <criterion>+ "]"
131"[" <criterion>+ "]"
132.It <criterion> ::=
132.It "<criterion> ::="
133<status> "=" <action>
133<status> "=" <action>
134.It <status> ::=
134.It "<status> ::="
135"success" | "notfound" | "unavail" | "tryagain"
135"success" | "notfound" | "unavail" | "tryagain"
136.It <action> ::=
136.It "<action> ::="
137"return" | "continue"
138.El
139.Pp
140Each entry starts on a new line in the file.
141A
142.Sq #
143delimits a comment to end of line.
144Blank lines are ignored.

--- 57 unchanged lines hidden (view full) ---

202.Nm
203doesn't exist, or it has missing or corrupt entries,
204.Xr nsdispatch 3
205will default to an entry of
206.Dq files
207for the requested database.
208Exceptions are:
209.Bl -column passwd_compat "dns files" -offset indent
137"return" | "continue"
138.El
139.Pp
140Each entry starts on a new line in the file.
141A
142.Sq #
143delimits a comment to end of line.
144Blank lines are ignored.

--- 57 unchanged lines hidden (view full) ---

202.Nm
203doesn't exist, or it has missing or corrupt entries,
204.Xr nsdispatch 3
205will default to an entry of
206.Dq files
207for the requested database.
208Exceptions are:
209.Bl -column passwd_compat "dns files" -offset indent
210.Sy Database Default source list
211.It group compat
212.It group_compat nis
213.It hosts dns files
214.It passwd compat
215.It passwd_compat nis
210.It Sy "Database Default source list"
211.It "group compat"
212.It "group_compat nis"
213.It "hosts dns files"
214.It "passwd compat"
215.It "passwd_compat nis"
216.El
217.Sh FILES
218.Bl -tag -width /etc/nsswitch.conf -compact
219.It Pa /etc/nsswitch.conf
220The file
221.Nm
222resides in
223.Pa /etc .
224.El
225.Sh EXAMPLES
226To lookup hosts in
227.Pa /etc/hosts
228and then from the DNS, and lookup user information from
229.Tn NIS
230then files, use:
231.Bl -column "passwd:" -offset indent
216.El
217.Sh FILES
218.Bl -tag -width /etc/nsswitch.conf -compact
219.It Pa /etc/nsswitch.conf
220The file
221.Nm
222resides in
223.Pa /etc .
224.El
225.Sh EXAMPLES
226To lookup hosts in
227.Pa /etc/hosts
228and then from the DNS, and lookup user information from
229.Tn NIS
230then files, use:
231.Bl -column "passwd:" -offset indent
232.It hosts: files dns
233.It passwd: nis [notfound=return] files
234.It group: nis [notfound=return] files
232.It "hosts: files dns"
233.It "passwd: nis [notfound=return] files"
234.It "group: nis [notfound=return] files"
235.El
236.Pp
237The criteria
238.Dq [notfound=return]
239sets a policy of "if the user is notfound in nis, don't try files."
240This treats nis as the authoritive source of information, except
241when the server is down.
242.Sh SEE ALSO

--- 24 unchanged lines hidden ---
235.El
236.Pp
237The criteria
238.Dq [notfound=return]
239sets a policy of "if the user is notfound in nis, don't try files."
240This treats nis as the authoritive source of information, except
241when the server is down.
242.Sh SEE ALSO

--- 24 unchanged lines hidden ---