admhostdel(1M)

NAME
admhostdel - deletes an existing host

SYNOPSIS

admhostdel [ -i IP_addr] [-x ns=NIS+|NIS|NONE]
[-x domain=domain|rhost=host1[,host2,...]]
[-x predel=script] [-x postdel=script] host...

DESCRIPTION
The Solstice admhostdel command deletes an existing host from the system databases. It also removes any server support associated with that host, depending upon the host type. If the host has more than one IP address (it is a multihomed host), all entries for the host are deleted. If only one entry needs to be deleted, the -i option can be used to specify the exact entry to delete. If only one entry of many is being deleted, only the hosts map is updated. All other maps are untouched.

AVAILABILITY

SUNWsacb package.

OPTIONS

-i IP_addr
    The IP address for the multihomed host to delete.

-x  Indicates that extended, nonstandard options follow.

    predel=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the server before the AutoClient is deleted. The script has to be executable. The option is only valid when the type is AUTOCLIENT. See admenviron(5) for a description of the script environment.

    postdel=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the server after the AutoClient is deleted. The script has to be executable. The option is only valid when the type is AUTOCLIENT. See admenviron(5) for a description of the script environment.

    ns=NIS+|NIS|NONE
        Sets name service. The default is to use the name service configured on the host on which the command is run. The precedence is NIS+, NIS, then NONE.
        NIS+
            Updates the NIS+ host configuration tables for the current domain.

        NIS Updates the NIS host configuration tables for the current domain.

        NONE
            Updates the local host configuration files.

    domain=domain|rhost=host
        Specifies domain or remote host. The domain can be specified when the value for the ns parameter is NIS+ or NIS. The domain defaults to the current systems domain. The rhost may be specified when the value for the ns parameter is NONE. The rhost defaults to the current system. The rhost parameter can be used to perform the operation on one or more specified hosts. The host specified as an argument to rhost must be running AdminSuite 2.1 or later for the command to complete successfully. .RE

host...
    The host, or hosts, to delete.

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of admhostdel: LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES.

ERRORS

The admhostdel command exits with one of the following values:

0   Success.

1   Invalid command syntax. A usage message for the admhostdel command is displayed.

2   An error occurred while executing the command. An exception code and error message are displayed.

RESTRICTIONS
You must be a member of UNIX group 14, the sysadmin group, to execute this command. Also, if ns=NIS+, you must be a member of the NIS+ admin group (See nisgrpadm(1)). Interrupt signal handling is disabled while deleting the host to insure that the system is in a consistent state. When deleting a system that has more than one IP address (it is a multihomed host), the default is to delete all system information, including all IP addresses. To delete only one IP address of a multihomed host use the -i IP_addr option to specify which IP address to delete.

EXAMPLES
The following command removes a host named inst from the NIS+ tables.

admhostdel -x ns=NIS+ inst The following command removes one IP address from the hosts map for the multihomed host os_server.

admhostdel -i 129.152.110.43 -x ns=NIS+ os_server

FILES
/etc/inet/hosts
/etc/ethers
/etc/timezone
/etc/bootparams

SEE ALSO
admhostadd(1M), admhostls(1M), admhostmod(1M), admenviron(5)