SUMMARY:Rename HostName/Sol 2.5

From: Lau, Victoria H (vlau@msmail2.hac.com)
Date: Mon Jun 03 1996 - 11:56:29 CDT


Dear Sun-Managers:

I appreciate very much everyone's effort in enlightening me on the host name
change on Solaris 2.5, especially:

- Jane Medefesser
- Eugene Schmidt - VCS
- Geert Devos
- Kenneth Simpson
- Rahul Roy
- Tim Evans
- Niall O Broin
- Vahsen Rob
- Casper Dik
- Dirk Jansen
- Shifter
- Mike Fletcher
- Jeff Wasilko

My original question was:
========================
I'd just found out from a bug report that there were other hosts files
existing in /etc/net/tic* directories that made me wonder what other
files are hidden somewhere in the tree that I need to take care of
when I rename a host.

I've created a Master disk for Solaris 2.5. I made a copy of the
system disk on tape and am planning to download this tape to all of
my nodes. An interactive customized script will be run after the download
to change the hostname in the following files:
  /etc/hosts
  /etc/nodename
  /etc/hostname.le0, /etc/hostname.XXX.0 ...
  /etc/net/tic*/hosts
  and other third party software/driver config files

Am I missing other files for the hostname change? What are those hosts
files in the /etc/net/tic* directories for? I did a man on ticlts--it
refers to the loopback interface. What network processes depend on these
files to get the hostname? Are these files (hosts and services) identical
in all the tic* directories?

Summary of responses:
====================
Most responded that the above listed files were the ones I needed to worry
about, with warnings on the /etc/bootparams file on the server which needs
to be changed too, and the fact that the /etc/host is actually a symbolic
link to /etc/inet/hosts, do not use "rm" or "mv" commands on this file.

Another suggestion was using the jumpstart. I actually bought a jumpstart
book over the weekend to see what I could get out of it.

I was also given yet another solution to use the /usr/sbin/sys-unconfig
command to accomplish the above task. However, someone will have to
monitor each reboot on over 100 systems. I wish there were a non-interactive
version of the "sys-unconfig and its subsequent reboot which I could integrate
into the customized script. ONE WARNING on using sys-unconfig: the contents
of the pre-sys-unconfig /etc/hosts file will be gone.

The hosts files in the /etc/net/tic* directories are for diskless client info.

When I read the response to check the /etc/services file for an entry of the
service, I assumed that these files would be used if the ticlts, or ticots,
or ticotsord "service" was listed in this file. PLEASE CORRECT ME IF I WERE
WRONG!

===============================================================================
Here are the responses I received.
=================================
If you use the /usr/sbin/sys-unconfig command it will automatically take
care of every instance of hostname. Here's how it works: You issue the
command "/usr/sbin/sys-unconfig". It warns you that it will render your
machine
blank and halt it. The message is scarry, but it's not all that bad: After
you answer "y", it will unconfigure your machine and halt it. Then you reboot
(-r if necessary) and the system comes up. At some point during the boot it
will recognize the fact that it's unconfigured and prompt you for information
regarding the machine's hostname and network configuration. ( It resembles
a manual Solaris installation. ) The only time it DOESN'T work for changing
a hostname is in a situation where you have the old name in some server's
/etc/bootparams mapped by ethernet-ID. In that case it will automatically
pick
up the old hostname from the net and you will have to do it manually. ( OR
you can change the bootparams entry on the offending server ).

Based on your description of what you are trying to do, you will also need
to change the IP address for each new machine. sys-unconfig will do that for
you too.

Jane Medefesser
===============================================================================
Can be done.

However, watch out for a trap: look at /etc/inet directory. The
/etc/host file is a symbolic link to /etc/inet/hosts, as can be seen
by doing a "ls -l /etc/hosts" on a healthy system. So watch out for
commands like rm, mv etc.

Eugene Schmidt
===============================================================================
You've got all the related files summed up quite nicely here. And you don't
need to do anything else, bar for rebooting (or using SIGHUP) to clear the
name that is loaded in RAM or is cached and getting the new one.

Geert Devos
===============================================================================
Hi - look at your /etc/services file and make sure there's an entry for
the service.

-- Ken Simpson
===============================================================================
The /etc/net/tic* directories are for diskless client info....otherwise
those files are not used....

Rahul Roy
===============================================================================
sys-unconfig

Tim Evans
===============================================================================
Very intresting these /etc/net/tic*/hosts files, never heared of them.
I always change machine names on Sol 2.x using the other hostnames you
listed.... In fact a looked at a machine on which i did a change like
that a few months ago and saw that these tic*/hosts files still were wrong !
I never had problems with this machine !!!

Rob Vahsen
===============================================================================
you're really better of using jumpstart. A master disk will need to take
device trees, kernel acrchitectures etc into account (i..e, you need to
make a different master for each type of system, even if they only differ
in graphics option)

Casper Dik
===============================================================================
That's all you have to change.

Dirk Jansen
===============================================================================
The files you mention here should be the only ones you need to modify in order
to change the hostname.

John Shifter
===============================================================================
        You could always run 'sys-unconfig' to blank out
all of the hostname, network, and NIS(+) configuration. That
may be more than you want but . . ..

Mike Fletch
===============================================================================
You can use sys-unconfig to have the system take care of it for
you, but it will nuke your hosts file....

Jeff Wasilko
===============================================================================

Once again, thanks all of you for taking the time to help me.

Sincerely,
Vicky Lau
vlau@msmail2.hac.com



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:00 CDT