Installing and Administering LAN/9000 Software
56 Chapter3
Manually Installing and Configuring LAN/9000
Creating the /etc/hosts File
printable character except spaces, newline, or the
comment character (#). Naming Convention: the first
nine characters should be unique for each network
host.
alias
Common name or names for the node. An alias is a
substitute for
host_name
. Alias names are optional.
Naming Convention: the first nine characters should be
unique for each network host.
/etc/hosts Format
When creating the /etc/hosts file, follow these rules:
• Lines cannot start with a blank or tab character.
• Fields can have any number of blanks or tab characters separating
them.
• Comments are allowed and designated by a pound sign (#) preceding
the comment text.
• Trailing blank and tab characters are allowed.
• Blank line entries are allowed.
• Only one host entry per line is allowed.
/etc/hosts Permissions
HP recommends that the /etc/hosts file be owned by user root and
have 0444 (-r—r—r—) access permission. For more information on
/etc/hosts, refer to the hosts(4) man page in the HP-UX Reference
Pages.
NOTE HP highly recommends that you limit access to the /etc/hosts file by
setting the permission to 0444 or (-r—r—r—) for read access only.
/etc/hosts Example
The following /etc/hosts entry contains an IP address, hostname, and
alias names (host3.site2.region4 and grace).
192.6.1.1 host3 host3.site2.region4 grace