admhostadd(1M)

NAME
admhostadd - adds a new host entry

SYNOPSIS

admhostadd -i IP_addr [-e ethernet_addr]
[-x type=host_type]
[-x tz=timezone] [-x term=type]
[-x fileserv=file_server] [-x root=directory]
[-x swap=directory] [-x swapsize=size]
[-x disconn=Y|N] [-x pw=Y]
[-x passwd=root_password] [-x install=Y|N]
[-x installpath=server:/path]
[-x bootpath=server:/path] [-x profile=server:/path]
[-x os=version] [-x diskconf=configuration]
[-x preadd=script] [-x postadd=script]
[-x predisk=script] [-x postdisk=script]
[-x ns=NIS+|NIS|NONE]
[-x domain=domain|rhost=host]
host

admhostadd -D [-x fileserv=file_server]
[-x root=directory] [-x swap=directory]
[-x swapsize=size] [-x os=version]
[-x ns=NIS+|NIS|NONE]
[-x domain=domain|rhost=host]

DESCRIPTION
The Solstice admhostadd command adds a new host entry to the system databases. It also sets up the necessary server support for the host, depending on its type. Specifying admhostadd -D with one of its additional options sets the default values for the respective fields. See the -D option below. Subsequent admhostadd commands use these values as the default.

AVAILABILITY

SUNWsacb package.

OPTIONS

-i IP_addr
    The IP address for the host, in the form 192.9.200.1.

-e ethernet_addr
    The Ethernet address.

-x  Indicates that extended, nonstandard options follow.

    type=host_type
        The type of host, as follows:
        STANDALONE
            Standalone host. This is the default setting.

        DISKLESS
            Diskless host.

        DATALESS
            Dataless host.

        AUTOCLIENT
            AutoClient host.

        JAVASTATION
            JavaStation host.

        OS_SERVER
            Operating system software server for diskless or Autoclient hosts.

        GENERIC
            For systems you just want to add to the configuration tables to enable network access, but you don't intend to manage.

    tz=timezone
        The timezone is the path of a timezone file, relative to /usr/share/lib/zoneinfo. The default is US/Pacific.

    term=type
        The terminal type of the client console. The default is sun. This option applies only when adding a SunOS 4.x diskless client.

    fileserv=file_server
        The name of the server where the file systems will reside. Used only for dataless, diskless, and AutoClient clients.

    root=directory
        The directory in which to create the root directory for diskless and AutoClient clients.

    swap=directory
        The directory in which to create the swap file for diskless clients.

    swapsize=size
        The size, in megabytes, of the swap file for diskless clients and AutoClients.

    disconn=Y|N
        Enables or disables disconnected operation for the client's CacheFS mounts. The option applies only to AutoClient systems running Solaris 2.5 or later. When this feature is enabled, the client can run using the cache when the server is unavailable.

    pw=Y
        Prompt for the system's root password. This option is only valid when adding a diskless client or AutoClient.

    passwd=root_password
        Specify the system's root password. This option is only valid when adding a diskless client or AutoClient.

    install=Y|N
        Enables or disables remote install.

    installpath=server:/path
        The name of the install server and the path on that server to the install media.

    bootpath=server:/path
        The name of the boot server and the path on that server to the install root.

    profile=server:/path
        The name of the profile server and the path on that server to the JumpStart profile directory.

    os=version
        Specifies the operating system version for remote installs, diskless, dataless, and AutoClient clients. The version is specified using the format instruction_set.implementation.Solaris_version. In this syntax:

        instruction_set
            is one of sparc, i386, or ppc.

        implementation
            is the implementation architecture. Examples include i86pc, sun4m and prep.

        version is the Solaris 2 version number.

        For example, the following is a sample os version entry: sparc.sun4d.Solaris_2.5.

    diskconf=configuration
        Specifies the Autoclient's disk configuration. The value for configuration is typically 1disk, 2disks, local200 or local400. The option is only valid when the type is AUTOCLIENT.

    preadd=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the server before the AutoClient is added. 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.

    postadd=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the server after the AutoClient is added. 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.

    predisk=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the AutoClient during its first boot before the cache is configured. It is run only once. The option is only valid when the type is AUTOCLIENT. See admenviron(5) for a description of the script environment.

    postdisk=script
        Specifies the name of a script in the /opt/SUNWadmd/Scripts directory which will be run on the AutoClient during its first boot after the cache is configured. It is run only once. 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+
            This command updates the NIS+ host configuration tables for the current domain.

        NIS This command updates the NIS host configuration tables for the current domain.

        NONE
            This command 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 can 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 the specified host. The host specified as an argument to rhost must be running AdminSuite 2.1 or later for the command to complete successfully.

host
    The new host name.

-D
    When specified with no other options, displays the default values that will be used when creating a new host. When used with one of the additional options, the -D option sets the default value for the specified fields. Using the ns, domain, and rhost parameters with -D does not set the default for these parameters, but instead specifies where the defaults are to be found or saved. The display format shows each key/value on a separate line. The key name is delimited from the value by a colon (:). For example,
    Root Path: /export/root
    The current keys are OS, Root Path, Swap Path, Swap Size, and File Server. Additional keys for new defaults may be added in the future, so a script using this command should not depend on just these keys as output of the -D option.

ENVIRONMENT

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

ERRORS

The admhostadd command exits with one of the following values:

0   Success.

1   Invalid command syntax. A usage message for the admhostadd 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 adding the host to insure that the system is in a consistent state. When adding another IP address for a host that already exists, it is assumed that this host is a multihomed host. In this situation the only valid options are: -i, -x ns, -x domain, -x rhost, and host. Dataless clients are not supported with operating systems greater than Solaris 2.5.1; if you try to add a dataless client serviced by an OS server running an operating system greater than Solaris 2.5.1, you will receive an error message.

EXAMPLES
admhostadd can be used in two general scenarios. One is to add system information to a name service database for the purpose of managing that host. The other is to manage an OS server (a machine that provides system services to diskless clients and AutoClient systems). The following command uses the -D option to set default values for fields used by admhostadd. (This enables you to add several hosts with similar configurations, without having to specify all the options each time.) admhostadd -D -x swapsize=24 -x ns=NIS+ -x fileserv=fileserver

The following command adds a standalone system named testhost to the NIS maps. admhostadd -e 8:0:20:1a:b5:c2 -i 129.152.227.54 -x ns=NIS testhost

By default, testhost will be added as a standalone system. The following command adds an OS server named osserver.

admhostadd -e 8:0:20:ff:bf:12 -i 129.152.227.56 -x ns=NIS -x type=OS_SERVER osserver If the OS server created above (osserver) has more than one IP address (it is a multihomed host), then the following command can be used to add the new IP address to the hosts map.

admhostadd -i 129.152.123.1 -x ns=NIS osserver

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

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