How to change hostname and ip in solaris


 
Thread Tools Search this Thread
Special Forums IP Networking How to change hostname and ip in solaris
# 1  
Old 05-27-2002
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
# 2  
Old 05-27-2002
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.
# 3  
Old 06-04-2002
Re: How to change hostname and ip in solaris

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
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

change hostname end ip adresse in solaris 9

hi everybody which files i should change to modify my hostname and my adresse ip in solaris 9 . or how can i do that :confused: it's very important to me thnx (2 Replies)
Discussion started by: lid-j-one
2 Replies

2. Red Hat

Change hostname

Hello, I would like to change the hostname on a Linux server (RHEL4). I try different methods in vain : - by using hostname command - by changing /etc/hosts and /etc/hostname But after restarting server, the old hostname re-appears... :confused: And the file ./proc/sys/kernel/hostname... (3 Replies)
Discussion started by: madmat
3 Replies

3. Solaris

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. (6 Replies)
Discussion started by: shabu
6 Replies

4. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

5. UNIX for Dummies Questions & Answers

change hostname

Hi, I asked this question whenI was running solaris 8 and got some very good answers. I've just uograded to Solaris 10 and there seems to quite a few changes so I need to know again. https://www.unix.com/showthread.php?t=8547 ------------ Hi (now solaris 10) I know how to change the... (2 Replies)
Discussion started by: fishman2001
2 Replies

6. HP-UX

Change IP and Hostname

Hello.. I wanted to know how to change IP and Hostname on HPUX system, and I don't want to make it as NIS master either. Could someone tell me the files I need to modify and make sure it's on network? Thanks! :o (3 Replies)
Discussion started by: catwomen
3 Replies

7. UNIX for Advanced & Expert Users

Change of Hostname

Dear All. I will like to know beside the following command "hostname hostname" what other command that can change the hostname of the Unix. Thanks. (4 Replies)
Discussion started by: gelbvonn
4 Replies

8. UNIX for Dummies Questions & Answers

change hostname

Hi, ( running solaris 8 ) I know how to change the hostname temparily, by login in as root typing hostname = xxxxx but, this obviously goes when the system is rebooted. I'm not sure what files need changing to make this a permant change. Could anyone help me please? (9 Replies)
Discussion started by: fishman2001
9 Replies
Login or Register to Ask a Question