Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

domainname(1)

sysadm(1M)

hosts(4)

cap_defaults(5)



admhost(1M)                    DG/UX R4.11MU05                   admhost(1M)


NAME
       admhost - manage hosts database

SYNOPSIS
       admhost -o add [ -y ] [ -l alias-list ] -a network-address host-name

       admhost -o modify [ -y ] [ -n new-host-name ] [ -a network-address ]
               [ -l alias-list ] host-name

       admhost -o delete [ -yq ] host-name ...

       admhost -o list [ -y ] [ -qv ] [ -s ] [ host-name ...  ]

DESCRIPTION
       admhost manages the local or the NIS (YP) hosts(4) database.  The
       hosts database consists of a list of host names and the Internet
       address and possible aliases for each.

   Operations
       add       Create a new hosts entry.

       modify    Change a host name, network address or alias list for an
                 existing hosts entry.

       delete    Remove an entry from the hosts database.

       list      List one or more entries from the hosts database.
                 Information is listed about each of the host-names given;
                 if no host-names are given or host-name is "all",
                 information about all hosts is listed.

   Options
       -y        Perform the requested operation on the global NIS database.
                 Without this option, the requested operation is performed
                 on the local database in the /etc directory.  If specified
                 with the add, delete, or modify operations, this option is
                 valid only if the machine on which the command is run is
                 the NIS master.  The -y option uses the default domain name
                 derived from the SRC_DIR variable specified in the NIS
                 makefile (/etc/yp/Makefile).

       -a network-address
                 network-address is the Internet address of the host. If
                 this option is excluded on modify, the current Internet
                 address for the host is preserved.

       -l alias-list
                 alias-list is a comma-separated list of aliases by which
                 the host can be referenced.  If this option is excluded on
                 modify, the current alias list for the host is preserved.

       -n new-host-name
                 new-host-name is the new name of the host.  Without this
                 option, the host name is not changed.

       -q        "Quiet."  Produce an unformatted listing (i.e. no headers,
                 fields delimited by a single space).  When this option is
                 used with the delete operation, no confirmation is
                 presented before the host-name is deleted.

       -s        "Sort." Sort the listing by host name.

       -v        "Verbose."  Produce a formatted listing with headers and
                 aligned columns.  This is the default.

       admhost expects all Internet addresses to be of the form

            a.b.c.d,

       where a is a decimal number between 0 and 224, and b, c, and d are
       decimal numbers between 0 and 255.

OUTPUT
       The list operation writes its output to stdout.

       The verbose form of the list operation outputs the name, Internet
       address and alias list for each host.  Information is printed in
       aligned columns with column headers.

       If -q option is specified with the list operation, headers are
       suppressed and each entry is printed on a separate line.  The fields
       within the entry are delimited by a single space, and are in the
       following order:
                  internet_address host_name alias1 alias2 aliasN ...

FILES
       /etc/hosts
                 Local hosts database file.

DIAGNOSTICS
   Warnings
       None.

   Errors
        -  The -y option is specified for an add, delete, or modify
           operation and the host is not the NIS master.

        -  The add operation is requested, and host-name or network-address
           already exists.

        -  The modify operation is requested, and new-host-name or network-
           address already exists.

        -  The network-address is not a valid Internet address.

        -  The -y option is specified, and there is an error exporting NIS
           maps.

        -  The delete or modify operation is requested, and host-name does
           not exist.

   Exit Codes
        0     The operation was successful.

        1     The operation was unsuccessful.

        2     The operation failed due to access restrictions.

        3     There was an error in the command line.

NOTES
       You must have write permission to the hosts database to use the add,
       delete, and modify operations.  To have such permission, you must
       have appropriate privilege, which, on a generic DG/UX system, means
       that you have superuser privilege, or an effective UID of root.  See
       the appropriate_privilege(5) man page for more information.

       On a system that supports the DG/UX Capability option, appropriate
       privilege is defined as having one one or more specific capabilities
       enabled in the effective capability set of the user.  See
       cap_defaults(5) for the default capabilities for this command.

SEE ALSO
       domainname(1), sysadm(1M), hosts(4).  cap_defaults(5).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026