Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have installed the Solaris 7 on intel machine connected to LAN with some arbitrary Host name and IP address. Now I have started using the system and I wish to change the Host name and IP address without reinstalling the OS. How to do it?

You can do this easily by changing a couple of files. First, your IP address is stored in the file associated with your NIC. Look in /etc for a file 'hostname.xxx' where xxx is your ethernet device name. This file contains the IP address for the machine. I am assuming you are not using DHCP. If you have more than one NIC, there will be a file for each NIC. Next, look for a file called 'nodename' in /etc. This contains the machine name. If you are connected to a router you will also have to change /etc/defaultrouter to reflect the IP address of the router. Next you will have to change /etc/inet/netmasks to reflect the IP network address and subnet mask. Finally, of course, you will have to change /etc/inet/hosts if your machine is in the host table. If you are using DNS for name resolution, you will also probably have to change /etc/resolv.conf. There, now wasn't that obvious? I hope I haven't left anything out.

Paul's method is generally considered the one for thrillseekers. I think he's got about half the files involved. I have memories of about 18 files involved.
alt.solaris.x86 faq has a post for this process from the horse's mouth.
doing a sys-unconfig as root is the method recommended by Sun, this reverts your system to vanilla, then reboots, comes up with the prompts for root password, hostname, net status etc. as per a new install.
I can't remember whether it leaves /etc/hosts intact, maybe best to back any hand modded asppp, /etc/System and nsswitch related files to a admin level user home directory for safekeeping. (a ufsdump 0 of / slice at least would be prudent, of course, but you do that as a matter of procedure, don't you, and restoring it will back you out of your changes)
man sys-unconfig and man ufsrestore before you start and make sure you understand what you're doing. repost or email (flammage to /dev/nul ) if you wnat more help.

In the first reply, a few files are forgotten... To make it work, check for files that contain your old hostname and change it for the new one:
/etc/inet/hosts
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
/etc/hostname.
/etc/nodenameAlso enter the command "hostname" with the new name as an option.
In the hosts file, you can also change your IP number. Then reboot the machine.

use ifconfig to take down, change address, netmask, etc., and restart the NIC.
You can change the IP address, netmask and gateway without rebooting, but a hostname change requires a reboot.

![]() |
printer port-Scsi drivers
|
Voodoo5 5500 with Solaris...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |