Changing Host name

Tom Achtenberg plug-discuss@lists.plug.mybutt.net
Sun, 20 Jan 2002 21:47:55 -0700


Thanks, this worked and I can now print.  Unfortunately now I cannot reach
the internet with this machine.  I could before.  I'm not sure where to even
start looking.  I connect through my network through my e-smith server.  Any
web address I try to go to I get "www.whatever.xxx unknown host."


----- Original Message -----
From: "Robert A. Klahn" <rklahn@acm.org>
To: <plug-discuss@lists.plug.mybutt.net>
Sent: Sunday, January 20, 2002 7:56 PM
Subject: Re: Changing Host name


Greetings:

In RedHat (at least 7.2), the hostname is in /etc/sysconfig/network. You
will need a line in that file like this:

HOSTNAME=george

Replacing "george", of course, with your hostname, unless, of course, you
name your machine after Curious George too! :) The setting in this file can
also be edited with the "Network Configuration" GUI which is found, at least
for those of use who use Gnome, on the Programs -> System -> Network
Configuration menu entry, under the "DNS" (not hosts, where you might expect
to find it) tab.

Speaking of the hosts file, its also good if you have an entry for your
hostname in /etc/hosts. You can set this under the same Network
Configuration GUI, or you can manualy edit /etc/hosts. I have a line like:

127.0.0.1 localhost george

And I seem to get away with binding this name to the localhost interface. I
would expect some programs to expect your hostname to resolve to a
non-loopback interface, but I have not run into one yet.

BTW, the setting in /etc/sysconfig/network only affects the hostname that is
set at boottime. If you want to change your hostname on the fly, you can do
a:

/bin/hostname george

Hope this helps.

Bob.

On Sun, 20 Jan 2002 19:50:43 -0700
"Tom Achtenberg" <tom@ybnormal.org> wrote:

> I've been trying with no luck to figure out where to change the hostname
for my RH 7.2 Linux box.  I get a bad hostname error whenever I boot when
trying to start lpd service.  Whenever I try to print to one of my network
printers I get a box that simply says "There was an error trying to send to
the printer."  I used an editor to look in /bin/hostname but the only line
there is compiled and not text.
>
>
> Tom Achtenberg
>
> Visit my home page at http://achtenberg.com
>
>


--
Robert A. Klahn
rklahn@acm.org

"Hope has two beautiful daughters: Anger and Courage. Anger at the way
things are, and Courage to struggle to create things as they should be." -
St. Augustine
________________________________________________
See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post
to the list quickly and you use Netscape to write mail.

PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.mybutt.net
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss