HPlogo HP-UX Reference > S

set_parms(1M)

HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

set_parms — set system initial identity parameters: host name, date, time, root password, networking

SYNOPSIS

set_parms initial set_parms hostname set_parms timezone set_parms date_time set_parms ip_address set_parms addl_netwrk

DESCRIPTION

The set_parms command is an interactive system setup command that allows you to specify various "initial identity parameters" when first booting a newly installed operating system (whether preinstalled, or installed locally from media or an install server), and to revise these parameters later on a running system. Initial identity parameters are a minimal set of values required to bring a system to an initially useful state. They include the following:

  • system host name

  • time zone for the system's location

  • date and time

  • root password

  • IP address

  • netmask, default routing, DNS, and NIS information

In a first-boot situation, set_parms is invoked automatically by /sbin/auto_parms. For set_parms purposes, "first boot" is defined as having no host name set when the system wakes up. This causes set_parms to step through all of its subareas to help you set all of the initial identity parameters.

After the system has booted and is running, set_parms may also be called from the command line to step through all areas (via set_parms initial), similar to how it works at first boot, or to finish setting up a particular subarea (the latter forms above). There are certain limitations to its actions when it's run after first boot, as described see below.

Note: The set_parms command only sets the root (superuser) password during "initial" processing, and then only if it is not already set. If so, it uses the passwd(1) command, so the effect is immediate.

The set_parms command has two available user interfaces: Graphical and terminal-based. At first boot, the graphical interface is used if the system console is a graphics device, otherwise a terminal interface is used. If set_parms is invoked later on a running system, the graphical interface is used if and only if the DISPLAY parameter is set in the user's environment and an X server can be contacted at the host referenced in the DISPLAY variable. If run under CDE, set_parms should automatically select the graphical interface.

The set_parms command is also DHCP-aware. If you attempt to change DHCP-supplied data such as the host name or IP address, set_parms issues a warning. If you continue with the changes, set_parms relinquishes the DHCP lease. On first boot, set_parms asks if you would like like to try getting setup data from a DHCP server.

However invoked, the set_parms command often knows and provides default values for many of the initial identity parameters, based on values specified to Ignite-UX in a previous or recent installation of the system or found in system configuration files.

The set_parms command can be run only by the user with appropriate privilege.

Operands

Each subarea of set_parms is described below. In a first-boot situation, all of the subareas are run sequentially. Special first-boot behavior is noted below if applicable, along with any special cases when invoking set_parms on a running system. When calling a subarea directly, only a unique portion of the subarea name is required to be given; for example, set_parms h.

initial

Step through all the following operands.

hostname

Set the system host name: Validates a user-supplied host name according to host-naming conventions and sets various system initialization variables to operate with that host name. Particularly, set_parms edits /etc/hosts to associate the new host name with the current IP address of the system, if that can be determined. Note: It does not notify DNS (Domain Name Servers), etc. This higher level of configuration is handled later by broader configuration tools.

First boot

Also allows the user to specify a DHCP server from which to get host name and networking parameters, then confirms the information.

WARNING: When changing the host name, set_parms does not know about optionally installed software. If any such software remembers the previous host name, it might not work properly after the host name is changed.

A mechanism is provided that helps generalize the host-name-changing function. The set_parms command calls, in ls(1) sorted order, any executable commands found in the directory /sbin/ch_hostname.d. This occurs for both first-boot and non-first-boot calls. HP may in the future supply special commands in this location. The system administrator may also supply custom commands (programs or scripts) for site installations using, for example, Ignite-UX.

The system must be rebooted for any change to take full effect.

timezone

Select a time zone based on your country of location. Also allows you to set a user-supplied time zone. The system must be rebooted for any change to take effect.

date_time

Set the system date and time interactively: This is similar to calling date(1) as a privileged user, but without having to format a time specification string. The change takes effect immediately.

ip_address

Set or change the primary IP address for the system: This function edits the /etc/hosts file to associate the new IP address with the current host name. Note: It does not notify DNS (Domain Name Servers), etc. This higher level of configuration is handled later by broader configuration tools.

First boot

Also lets you pick the LAN interface (network interface card, or NIC) to set up for this and subsequent networking functions.

Not first boot

In multiple LAN systems, set_parms assumes the IP address to change is the one for the lowest numbered IP address / LAN Interface Card dataset in the /etc/rc.config.d/netconf file.

The system must be rebooted for any change to take effect.

addl_netwrk

Set the subnet mask (which defines the network and local subnet portions of a network address), set the default routing gateway, and define access to the Domain Name System (DNS) and Network Information Service (NIS).

First boot

These changes take effect immediately, without a reboot, because set_parms starts networking after setting the parameters.

Not first boot

A reboot is required for all of these changes to take effect.

set_parms and Ignite-UX / Cold Install

After "cold-installing" HP-UX from tape, CD-ROM, or DVD, or using Ignite-UX to install HP-UX from any source including an install server, the file /tmp/install.vars is normally left on the system. This file is used to communicate to set_parms and other tools the host name, networking, and other information that was used during the installation, to make it easier to use any of these values as final system parameters. In particular, set_parms uses as defaults the shell-style variables in this file that begin with INST_. For example, INST_LAN_DEV indicates which LAN interface was used during a network cold install. This is the LAN interface that set_parms configures.

In general, set_parms first looks in /tmp/install.vars for default information, then in the system configuration files in the /etc/rc.config.d directory. If any parameter is defined in both locations, the latter takes precedence.

If Ignite-UX is installed on your system, see the manual entries for ignite(5) and instl_adm(4). In particular, read instl_adm(4) for descriptions of the is_net_info_temporary, run_setparms, and final variables.

Native Language Support (NLS)

The set_parms command supports all of the standard HP-supplied languages. In first-boot situations, the language set_parms uses is dictated by either geocustoms(1M) or the LANG parameter as set in /etc/rc.config.d/LANG. The geocustoms command, if called by set_parms, allows you to pick both a "system setup" language (the language of the system administrator setting up the system, for use by the user interface), and a "system default" language (the language of the end user).

The set_parms command uses the "system setup" language as picked within geocustoms, unless the system default language is set to an Asian language. In this case, it uses the Asian language (from the file /etc/rc.config.d/LANG), since geocustoms itself does not provide an Asian language user interface.

Interaction with auto_parms and geocustoms

During the boot sequence, /sbin/rc always invokes auto_parms, which in turn detects the first-boot situation and the need to run geocustoms (note, these are independent conditions). It calls set_parms if either or both of these conditions are true. The set_parms command first sets up an X Window environment if the system console is on a graphics display, then calls geocustoms if necessary. If geocustoms is called, after it finishes, and always in a first-boot situation, set_parms starts its interface and, based on user input, might call back into auto_parms to obtain and set up the management of a DHCP lease. After set_parms completes this and other system setup tasks, control passes back to /sbin/rc, which completes the boot sequence using the newly created system initial identity parameters.

EXAMPLES

See /sbin/rc for invocation context in the first boot case.

FILES

/sbin/set_parms

The command itself.

/sbin/set_parms.util

Common subroutines used by set_parms and the subarea commands.

/sbin/set_parms.d/

Directory holding all of subarea commands called by set_parms, which runs them in sorted order.

/sbin/ch_hostname.d/

Directory containing any host-name-change commands defined by the user. These are standalone commands run, in sorted order, by set_parms when setting or changing the host name.

/tmp/install.vars

File left by Ignite-UX / Cold Install that contains networking and other system information used during the installation.

/etc/hosts

/etc/TIMEZONE

/etc/passwd

/etc/rc.config.d/netconf

/etc/rc.config.d/namesvrs

/etc/resolv.conf

System configuration files modified by set_parms.

AUTHOR

The set_parms command was developed by HP.

SEE ALSO

auto_parms(1M), dhcpdb2conf(1M), geocustoms(1M), instl_adm(4), ignite(5).