Quick ?s
Cheat Sheets
Man Pages
The Lynx
Software
UPDATEHOSTS(1)			   06:53:22			UPDATEHOSTS(1)



NAME
       updatehosts - update DNS and static host tables

SYNOPSIS
       updatehosts [ -d dbdirectory ] [ -f configfile ] [ -l ] [ -n ] [ -s ] [
       -v ] [ file ... ]

DESCRIPTION
       Updates the DNS and static host database zone files.

       updatehosts is a front-end to the gendns and genstatic  programs  which
       generate  DNS  zone  files the and static host file from a set of input
       files organized as a set of  flat  relational  files.   updatehosts  is
       driven	 off	of    a    configuration   file   usually   found   in
       /usr/local/etc/updatehosts.env which sets variables such as  the  loca
       tion  of  the  input  database  files.  An alternate configuration file
       location can be specified by the -f option.

       The  input  database  files  are  normally  kept   in   the   directory
       /var/named/db.	The location of this directory can be specified by the
       -d option or with the DB_DIR environment variable.  Output from update
       hosts  is  normally  placed  in the /var/named directory.  An alternate
       output directory location may be specified  by  setting	the  NAMED_DIR
       variable.

       The following files are maintained in the DB_DIR directory:

       main   Contains	information  about  each host within a set of domains.
	      Information such as the domain name of  each  host  and  its  IP
	      address are maintained in this file.

       cname  Contains information about aliases for hosts

       global Contains some global parameters

       mx     Contains information about MX (mail exchanger) records.

       options
	      Contains information about BIND V8 optios.

       ns     Contains information about NS (nameserver) records.

       secondary
	      Contains information about secondary zones served by this server

       soa    Contains information about SOA (start of authority) records.

       txt    Contains information about TXT (text) records.

       subnet Contains information about local subnets which is used to gener
	      ate an optional BOOTP or DHCP configuration file.

       Each  of  the  database	files is organized tabularly.  These files are
       preprocessed by the readinfo command.  (see readinfo.1)

       updatehosts may takes arguments which are the  names  of  the  database
       files  which the user wants to edit.  All database files may optionally
       kept under SCCS control by setting the USE_SCCS variable or by  placing
       the  -s	flag  on the command line.  Similarly RCS control can be main
       tained by setting the USE_RCS variable or setting the -r  flag  on  the
       command	line.	A user using updatehosts must have write permission in
       the DB_DIR and the NAMED_DIR directory.	Each database file  is	edited
       by  the	vi  editor  or whatever program the user has set in the EDITOR
       environment variable.

       After each edit, the database files  are  optionally  checked  back  in
       using  SCCS  or	RCS.  Then the static host file is generated using the
       genstatic command.  The host file is normally placed in	the  NAMED_DIR
       directory  under  the name static.  This name may be changed by setting
       the STATICHOSTS variable.

       Then the DNS zone files and bootstrap file are updated using the gendns
       command.  Both BIND Version 4 or Version 8 configuration files are gen
       erated.

       The local nameserver is restarted with the newly updated zone and boot
       strap files by calling poke_ns restart or poke_ns reload if the -l flag
       is specified

       Optionally, the POSTPROCESS environment variable can be set to the name
       of  a  command  to  run after the nameserver zone files and static host
       files are generated.  This can be  any  arbitrary  command.   Normally,
       this  may  be a command to update NIS or NIS+ host maps from the gener
       ated static host file.

       Environment variables should normally be set in the configuration  file
       except  when testing.  An exception to this rule is the EDITOR environ
       ment variable which is normally set to the users favorite editor.

Normal Configuration Setup
       updatehosts provides a great deal of flexibility in  how  a  nameserver
       zone  files and static host table are generated and the various permis
       sions on those files.  In normal practice it is desirable to set  up  a
       group  (say, staff) to manage the nameserver files.  Setting the direc
       tory permissions on the NAMED_DIR tree to allow	staff  to  create  and
       modify files in that tree allows updatehosts to be run by anyone in the
       staff group without root access.  The poke_ns program must  be  run  as
       root to restart the nameserver.	So setting it setuid to root, but only
       executable by the staff group allows any member of the staff  group  to
       restart the running nameserver.

See also
       gendns(1), genstatic(1), poke_ns(1)



4th Berkeley Distribution	    $Date:			UPDATEHOSTS(1)




Yals.net is © 1999-2009 Crescendo Communications
Sharing tech info on the web for more than a decade!
This page was generated Thu Apr 30 17:05:23 2009