xref: /freebsd/usr.sbin/mountd/netgroup.5 (revision 1e890b056ae039be18929c22b500c718bc4d0a5c)
18fae3551SRodney W. Grimes.\" Copyright (c) 1992, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
58fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
68fae3551SRodney W. Grimes.\" are met:
78fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
88fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
98fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
108fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
118fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
128fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
138fae3551SRodney W. Grimes.\"    must display the following acknowledgement:
148fae3551SRodney W. Grimes.\"	This product includes software developed by the University of
158fae3551SRodney W. Grimes.\"	California, Berkeley and its contributors.
168fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
178fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
188fae3551SRodney W. Grimes.\"    without specific prior written permission.
198fae3551SRodney W. Grimes.\"
208fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
218fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
228fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
248fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
258fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
268fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
278fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
288fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
298fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
308fae3551SRodney W. Grimes.\" SUCH DAMAGE.
318fae3551SRodney W. Grimes.\"
328fae3551SRodney W. Grimes.\"     @(#)netgroup.5	8.2 (Berkeley) 12/11/93
338fae3551SRodney W. Grimes.\"
348fae3551SRodney W. Grimes.Dd December 11, 1993
358fae3551SRodney W. Grimes.Dt NETGROUP 5
368fae3551SRodney W. Grimes.Os
378fae3551SRodney W. Grimes.Sh NAME
388fae3551SRodney W. Grimes.Nm netgroup
398fae3551SRodney W. Grimes.Nd defines network groups
408fae3551SRodney W. Grimes.Sh SYNOPSIS
418fae3551SRodney W. Grimes.Nm netgroup
428fae3551SRodney W. Grimes.Sh DESCRIPTION
438fae3551SRodney W. GrimesThe
448fae3551SRodney W. Grimes.Nm netgroup
458fae3551SRodney W. Grimesfile
468fae3551SRodney W. Grimesspecifies ``netgroups'', which are sets of
478fae3551SRodney W. Grimes.Sy (host, user, domain)
488fae3551SRodney W. Grimestuples that are to be given similar network access.
498fae3551SRodney W. Grimes.Pp
508fae3551SRodney W. GrimesEach line in the file
518fae3551SRodney W. Grimesconsists of a netgroup name followed by a list of the members of the
528fae3551SRodney W. Grimesnetgroup.
538fae3551SRodney W. GrimesEach member can be either the name of another netgroup or a specification
548fae3551SRodney W. Grimesof a tuple as follows:
558fae3551SRodney W. Grimes.Bd -literal -offset indent
568fae3551SRodney W. Grimes(host, user, domain)
578fae3551SRodney W. Grimes.Ed
588fae3551SRodney W. Grimeswhere the
598fae3551SRodney W. Grimes.Sy host ,
608fae3551SRodney W. Grimes.Sy user ,
618fae3551SRodney W. Grimesand
628fae3551SRodney W. Grimes.Sy domain
638fae3551SRodney W. Grimesare character string names for the corresponding component.
648fae3551SRodney W. GrimesAny of the comma separated fields may be empty to specify a ``wildcard'' value
658fae3551SRodney W. Grimesor may consist of the string ``-'' to specify ``no valid value''.
668fae3551SRodney W. GrimesThe members of the list may be separated by whitespace and/or commas;
678fae3551SRodney W. Grimesthe ``\e'' character may be used at the end of a line to specify
688fae3551SRodney W. Grimesline continuation.
698fae3551SRodney W. GrimesThe functions specified in
708fae3551SRodney W. Grimes.Xr getnetgrent 3
718fae3551SRodney W. Grimesshould normally be used to access the
728fae3551SRodney W. Grimes.Nm netgroup
738fae3551SRodney W. Grimesdatabase.
748fae3551SRodney W. Grimes.Pp
758fae3551SRodney W. GrimesLines that begin with a # are treated as comments.
761e890b05SBill Paul.Sh NIS/YP INTERACTION
771e890b05SBill PaulOn most other platforms,
781e890b05SBill Paul.Nm netgroups
791e890b05SBill Paulare only used in conjunction with
801e890b05SBill PaulNIS and local
811e890b05SBill Paul.Pa /etc/netgroup
821e890b05SBill Paulfiles are ignored. With FreeBSD,
831e890b05SBill Paul.Nm netgroups
841e890b05SBill Paulcan be used with either NIS or local files, but there are certain
851e890b05SBill Paulcaveats to consider. The existing
861e890b05SBill Paul.Nm netgroup
871e890b05SBill Paulsystem is extremely inefficient where
881e890b05SBill Paul.Fn innetgr 3
891e890b05SBill Paullookups are concerned since
901e890b05SBill Paul.Nm netgroup
911e890b05SBill Paulmemberships are computed on the fly. By contrast, the NIS
921e890b05SBill Paul.Nm netgroup
931e890b05SBill Pauldatabase consists of three seperate maps (netgroup, netgroup.byuser
941e890b05SBill Pauland netgroup.byhost) that are keyed to allow
951e890b05SBill Paul.Fn innetgr 3
961e890b05SBill Paullookups to be done quickly. The FreeBSD
971e890b05SBill Paul.Nm netgroup
981e890b05SBill Paulsystem can interact with the NIS
991e890b05SBill Paul.Nm netgroup
1001e890b05SBill Paulmaps in the following ways:
1011e890b05SBill Paul.Bl -bullet -offset indent
1021e890b05SBill Paul.It
1031e890b05SBill PaulIf the
1041e890b05SBill Paul.Pa /etc/netgroup
1051e890b05SBill Paulfile does not exist, or it exists and is empty, or
1061e890b05SBill Paulit exists and contains only a '+', and NIS is running,
1071e890b05SBill Paul.Nm netgroup
1081e890b05SBill Paullookups will be done exclusively through NIS, with
1091e890b05SBill Paul.Fn innetgr 3
1101e890b05SBill Paultaking advantage of the netgroup.byuser and
1111e890b05SBill Paulnetgroup.byhost maps to speed up searches. (This
1121e890b05SBill Paulis more or less compatible with the behavior of SunOS and
1131e890b05SBill Paulsimilar platforms.)
1141e890b05SBill Paul.It
1151e890b05SBill PaulIf the
1161e890b05SBill Paul.Pa /etc/netgroup
1171e890b05SBill Paulexists and contains only local
1181e890b05SBill Paul.Nm netgroup
1191e890b05SBill Paulinformation (with no NIS '+' token), then only the local
1201e890b05SBill Paul.Nm netgroup
1211e890b05SBill Paulinformation will be processed (and NIS will be ingored).
1221e890b05SBill Paul.It
1231e890b05SBill PaulIf
1241e890b05SBill Paul.Pa /etc/netgroup
1251e890b05SBill Paulexists and contains both local netgroup data
1261e890b05SBill Paul.Pa and
1271e890b05SBill Paulthe NIS '+' token, the local data and the NIS netgroup
1281e890b05SBill Paulmap will be processed as a single combined
1291e890b05SBill Paul.Nm netgroup
1301e890b05SBill Pauldatabase. While this configuration is the most flexible, it
1311e890b05SBill Paulis also the least efficient: in particular,
1321e890b05SBill Paul.Fn innetgr 3
1331e890b05SBill Paullookups will be especially slow if the
1341e890b05SBill Pauldatabase is large.
1351e890b05SBill Paul.El
1368fae3551SRodney W. Grimes.Sh FILES
1378fae3551SRodney W. Grimes.Bl -tag -width /etc/netgroup -compact
1388fae3551SRodney W. Grimes.It Pa /etc/netgroup
1398fae3551SRodney W. Grimesthe netgroup database.
1408fae3551SRodney W. Grimes.El
1418fae3551SRodney W. Grimes.Sh SEE ALSO
1428fae3551SRodney W. Grimes.Xr getnetgrent 3 ,
1438fae3551SRodney W. Grimes.Xr exports 5
1448fae3551SRodney W. Grimes.Sh COMPATIBILITY
1458fae3551SRodney W. GrimesThe file format is compatible with that of various vendors, however it
1468fae3551SRodney W. Grimesappears that not all vendors use an identical format.
1478fae3551SRodney W. Grimes.Sh BUGS
1488fae3551SRodney W. GrimesThe interpretation of access restrictions based on the member tuples of a
1498fae3551SRodney W. Grimesnetgroup is left up to the various network applications.
1508fae3551SRodney W. GrimesAlso, it is not obvious how the domain specification
1518fae3551SRodney W. Grimesapplies to the BSD environment.
1521e890b05SBill Paul.Pp
1531e890b05SBill PaulThe
1541e890b05SBill Paul.Nm netgroup
1551e890b05SBill Pauldatabase should be stored in the form of a
1561e890b05SBill Paulhashed
1571e890b05SBill Paul.Xr db 3
1581e890b05SBill Pauldatabase just like the
1591e890b05SBill Paul.Xr passwd 5
1601e890b05SBill Pauldatabase to speed up reverse lookups.
161