Change hostname in Solaris 9

Please anyone guide me how to change the hostname in Solaris 9? The IP of the machie is fetched from a DHCP server.

Start here

Change hostname of workstation

That deals with a static ip adress. For DHCP try Rich Teer's page here

thanx for yor reply guys.

i did the changes as per the documents. but still it's showing the hostname as unknown.

Do you want to hard code the hostname or do you want the DHCP server to provide the name?

Does nslookup work with the IP address the DHCP server returned to return the hostname you want?

You may be able to hard code it as follows:

solaris/hostname/dhcp

MY requirement is
1) the IP should to fetched from the DHCP server.
2) The server name should be set manually.

From /etc/init.d/network

#
# If DHCP was used on a primary interface then set the hostname
# that was returned. If no hostname was returned, set the name
# to be "unknown". The hostname must be set to something, because
# tooltalk will hang unless the name can be locally resolved.
# Sendmail also requires the name to be resolvable locally.
# Later, in inetsvc, we create a name "unknown" and create a entry
# in the local /etc/inet/hosts file pairing "unknown" with the IP
# address assigned by DHCP. The use of bootparams as a fallback
# for all non-DHCP cases provides compatibility with the
# behavior of the system before netstrategy was introduced.
#