How to change hostname and ip in solaris

Dear all, I am going to change the IP address and hostname in my solaris, but I don't know how to do it.

If you have any idea or suggestion, please fell free to let me know.

Thanks and Regards

The files that set hostname and IP address are always in /etc
(Solaris: /etc/inet/hosts)
Solaris has commands sys-unconfig, sysidconfig, and friends for when you really want to unconfigure/reconfigure a host
But back to the modest change-the-hostname task, Files to edit:

/etc/hostname.<interface-name> (hme0, le0, ...)
/etc/nodename
/etc/defaultrouter
/etc/netmasks (maybe)
/etc/net/ticlts/hosts (optional)
/etc/net/ticots/hosts (optional)
/etc/net/ticotsord/hosts (optional)

Now when you reboot, the host should come up with its new name and/or IP address.
If the machine has any possibly-delicate services that it provides (e.g. sendmail on your main mail server), you might want to disable these (take the relevant symlinks out of /etc/rc2.d before rebooting. Give a try do post back the results.

Hi

             To be on the safest side i have a few tips for you. Remember one thing that all the host settings are generally in the files /etc

so what you can do is, execute the following command

find . -exec grep `hostname` -print {} \; 2>/dev/null

The first column of the output is the list of all the files which need to be changed.

However i guess that the commands provided by the system are a more elegant way to do this all. Just a experiment, let me know that when you have executed the system commands do the files that you get from the list above get updated. Please let me know this.

rgds
penguin