diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-10-22 20:31:21 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-10-22 20:31:21 +0000 |
commit | bace352630e1f688d55c17a14a470e6edfb77d71 (patch) | |
tree | a83dc8ef17c9ba76b2780e1c8aaa2a65268e0f75 /usr.sbin/ypserv/ypinit/Makefile.yp.8 | |
parent | 31342e670dbd2c4c140b73ecadbee90e33185c74 (diff) |
man page for Makefile.yp, and associated bits; from Ingo Schwarze
ok deraadt
Diffstat (limited to 'usr.sbin/ypserv/ypinit/Makefile.yp.8')
-rw-r--r-- | usr.sbin/ypserv/ypinit/Makefile.yp.8 | 265 |
1 files changed, 265 insertions, 0 deletions
diff --git a/usr.sbin/ypserv/ypinit/Makefile.yp.8 b/usr.sbin/ypserv/ypinit/Makefile.yp.8 new file mode 100644 index 00000000000..a5f11b327c5 --- /dev/null +++ b/usr.sbin/ypserv/ypinit/Makefile.yp.8 @@ -0,0 +1,265 @@ +.\" $OpenBSD: Makefile.yp.8,v 1.1 2008/10/22 20:31:20 jmc Exp $ +.\" +.\" Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: October 22 2008 $ +.Dt MAKEFILE.YP 8 +.Os +.Sh NAME +.Nm Makefile.yp +.Nd generate and distribute YP maps +.Sh SYNOPSIS +.Li cd /var/yp; make +.Sh DESCRIPTION +The +.Nm +utility generates or updates the YP maps to be served by +.Xr ypserv 8 . +.Pp +Each YP domain to be served must have its own subdirectory below +.Pa /var/yp . +Use +.Xr ypinit 8 +to set up such subdirectories. +In particular, +.Xr ypinit 8 +will copy +.Pa /var/yp/Makefile.yp +into each new domain subdirectory. +For common configuration changes affecting all future domains, edit +.Pa /var/yp/Makefile.yp +before running +.Xr ypinit 8 . +For configuration changes affecting only one individual domain, edit the +.Pa Makefile +in the respective domain subdirectory after running +.Xr ypinit 8 . +Do +.Em not +edit +.Pa /var/yp/Makefile.yp.dist . +.Pp +By default, input data for generating YP maps is collected from the +.Pa /etc +directory. +Edit the +.Dv DIR +variable to choose a different source directory. +.Pp +To regenerate all maps for all domains, run +.Xr make 1 +in +.Pa /var/yp . +To regenerate all maps for one single domain, run +.Xr make 1 +in the respective domain subdirectory. +The +.Xr makedbm 8 +utility will be used to create the maps in +.Xr db 3 +format, and they will be stored inside the appropriate domain subdirectory. +.Pp +Whenever a YP map has been updated, it is automatically distributed to all +slave servers in the respective domain using the +.Xr yppush 8 +utility. +To disable automatic distribution, set the +.Dv NOPUSH +variable to an arbitrary, non-empty, value. +.Sh STANDARD YP MAPS +By default, +.Nm +provides the following +.Xr make 1 +targets: +.Bl -tag -width protocols +.It Ic passwd +Generates the +.Pa passwd.byname , +.Pa passwd.byuid , +.Pa master.passwd.byname , +and +.Pa master.passwd.byuid +maps from +.Xr master.passwd 5 +for use by +.Xr getpwent 3 . +.Pp +The +.Pa master.passwd.*\& +maps always contain complete records in +.Xr master.passwd 5 +format, including the encrypted passwords. +.Pp +The +.Pa passwd.*\& +maps follow the reduced +.Xr passwd 5 +format having the class, change, and expire fields removed but by default +the encrypted passwords are included too. +If the +.Dv UNSECURE +variable is changed to be empty, the encrypted passwords are replaced by +asterisks +.Pq Ql \&* . +.It Ic netgroup +Generates the +.Pa netgroup , +.Pa netgroup.byuser , +and +.Pa netgroup.byhost +maps from +.Xr netgroup 5 +for use by +.Xr getnetgrent 3 +and +.Xr passwd 5 . +Requires the +.Xr revnetgroup 8 +utility. +.It Ic group +Generates the +.Pa group.byname +and +.Pa group.bygid +maps from +.Xr group 5 +for use by +.Xr getgrent 3 . +.It Ic netid +Generates the +.Pa netid.byname +map from +.Xr netid 5 , +.Xr passwd 5 , +.Xr group 5 , +and +.Xr hosts 5 +for use by +.Xr getgrouplist 3 . +Requires the +.Xr mknetid 8 +utility. +.It Ic hosts +Generates the +.Pa hosts.byname +and +.Pa hosts.byaddr +maps from +.Xr hosts 5 +for use by +.Xr gethostbyname 3 . +Requires the +.Xr stdhosts 8 +utility. +.Pp +To get +.Xr ypserv 8 +to ask DNS for unknown hosts, set the +.Dv USEDNS +variable to +.Fl b . +.It Ic ethers +Generates the +.Pa ethers.byaddr +and +.Pa ethers.byname +maps from +.Xr ethers 5 +for use by +.Xr ethers 3 . +Requires the +.Xr stdethers 8 +utility. +.It Ic networks +Generates the +.Pa networks.byname +and +.Pa networks.byaddr +maps from +.Xr networks 5 +for use by +.Xr getnetent 3 . +.It Ic rpc +Generates the +.Pa rpc.bynumber +map from +.Xr rpc 5 +for use by +.Xr getrpcent 3 . +.It Ic services +Generates the +.Pa services.byname +map from +.Xr services 5 +for use by +.Xr getservent 3 . +.It Ic protocols +Generates the +.Pa protocols.byname +and +.Pa protocols.bynumber +maps from +.Xr protocols 5 +for use by +.Xr getprotoent 3 . +.It Ic aliases +Generates the +.Pa mail.aliases +and +.Pa mail.byaddr +maps from +.Xr aliases 5 . +This target uses both +.Xr sendmail 8 +with the option +.Fl bi +and the +.Xr mkalias 8 +utility. +.It Ic amd.home +Generates the +.Pa amd.home +map from the file +.Pa /etc/amd/amd.home . +.It Ic all +Generates all of the above. +.El +.Pp +In order to keep additional custom YP maps up to date, the +.Pa Makefile +should be extended to support additional targets. +.Sh FILES +.Bl -tag -width "/var/yp/domainname/ypservers.db" -compact +.It /var/yp/Makefile +Top level YP Makefile. +.It /var/yp/ Ns Ar domainname Ns /Makefile +Per domain YP maps Makefile. +.It /var/yp/ Ns Ar domainname Ns /ypservers.db +Database of hosts serving this domain. +.It /var/yp/ Ns Ar domainname/mapname Ns .db +Database files containing the YP maps. +.It /var/yp/ Ns Ar domainname/target Ns .time +Cookies controlling the operation of +.Xr make 1 . +.El +.Sh SEE ALSO +.Xr make 1 , +.Xr db 3 , +.Xr makedbm 8 , +.Xr yp 8 , +.Xr ypinit 8 , +.Xr yppush 8 , +.Xr ypserv 8 |