Re: hostname corrupted [SUMMARY]

From: Jens Herder (
Date: Fri Feb 03 1995 - 08:29:34 CST

In article <> (Jens Herder) writes:

> I try to administrate a Sun 10 with Solaris 2.2. The former hostname
> was "castor" but now the command hostname prints "-s". I cannot start
> the admintool anymore. How I can reset the hostname without reinstallation
> of the system. The file /etc/hostname.le0 contains "castor". What is
> wrong?

Thanks for all responses. The system is fine again. Let me summaries
the different approaches. I didn't check them all and used the command
uname -S <hostname> to set the name. I think the script hostname is
there only for historical reasons (BSD). I'm not sure if a reboot was
necessary, but after some login problems on the console I did it
including a touch to the file /etc/hostname.le0.

uname -S 'hostname'
then edit /etc/hostname.le0 and in /etc/hosts
# sys-unconfig <CR>

Be forewarned that sys-unconfig doesn't work cleanly with
Solaris 2.4

An alternate way other than sys-unconfig is to change the host* files
in 6 locations:


Note that "hostname" is the old SUNOS command (in /usr/ucb/hostname).
The equivalent of "hostname" under Solaris is "uname -n"
All you need to do is perform a touch reconfigure on the
/etc/hostname.le0. Then when you reboot your system you will be asked
what is your new system name.
Combinations of the above.

Kind regards

Jens Herder إ

Computer Industry Laboratory phone +81-242-37-2579 (office) THE UNIVERSITY OF AIZU +81-242-32-9118 (private) Tsuruga, Ikki-machi, Aizu-Wakamatsu City fax +81-242-37-2745 Fukushima, 965-80 Japan e-mail ---- New Site of Discovery -------- to Advance Knowledge for Humanity ---- 965-80 ż㾾 ̧Į 90

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:15 CDT