xref: /openbsd/usr.sbin/ypserv/mknetid/netid.5 (revision f6aab3d8)
1.\"	$OpenBSD: netid.5,v 1.13 2013/07/16 11:13:34 schwarze Exp $
2.\"
3.\" Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de>
4.\" Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se>
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
17.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
20.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: July 16 2013 $
29.Dt NETID 5
30.Os
31.Sh NAME
32.Nm netid
33.Nd YP network credential file
34.Sh DESCRIPTION
35The file
36.Pa /etc/netid
37consists of newline separated ASCII records.
38Each record consists of a key, a single blank character, and a value.
39The key and the value may be arbitrary strings except that neither
40may contain blank characters.
41.Pp
42Records in the file
43.Pa /etc/netid
44and in the
45.Pa netid.byname
46YP map are ignored by the system unless they have the following form:
47.Bd -literal
48unix.<uid>@<yp-domain> <uid>:<gid>,<gid>,...
49.Ed
50.Pp
51When YP is enabled in the
52.Xr group 5
53file, such records specify that the function
54.Xr getgrouplist 3
55shall return the specified groups in addition to the groups
56found in the group file.
57The file
58.Pa /etc/netid
59is parsed before the
60.Pa netid.byname
61YP map.
62Only the first matching record is used.
63.Pp
64The main use of the
65.Pa /etc/netid
66file is to allow certain users to log in even while YP is enabled but
67temporarily unavailable.
68These users must also be listed in the local
69.Xr master.passwd 5
70file.
71If consistency of group membership information is required while YP is
72enabled and available, all records in the
73.Pa /etc/netid
74file must agree with records in the
75.Pa netid.byname
76YP map, although the latter may contain additional records.
77If consistency of group membership information is required even while YP is
78enabled but unavailable, the records in the
79.Pa /etc/netid
80file must not grant more group memberships than the
81.Xr group 5
82file, and users having their own record in the
83.Pa /etc/netid
84file must not show up in the
85.Pa group.byname
86and
87.Pa group.bygid
88YP maps.
89.Pp
90On a YP master server,
91.Xr Makefile.yp 8
92uses the
93.Xr mknetid 8
94utility to generate the
95.Pa netid.byname
96YP map.
97In this case, the YP map will also contain records of the following form:
98.Bd -literal
99unix.<hostname>@<yp-domain> 0:<hostname>
100.Ed
101.Pp
102Such records are ignored by the system.
103.Sh FILES
104.Bl -tag -width /etc/netid -compact
105.It Pa /etc/netid
106.El
107.Sh EXAMPLES
108A netid file or YP map might look like the following:
109.Bd -literal -offset indent
110unix.10714@kaka 10714:400,10
111unix.jodie@kaka 0:jodie
112.Ed
113.Sh SEE ALSO
114.Xr getgrouplist 3 ,
115.Xr group 5 ,
116.Xr Makefile.yp 8 ,
117.Xr mknetid 8 ,
118.Xr yp 8
119.Sh AUTHORS
120.An Mats O Jansson Aq Mt moj@stacken.kth.se
121