Networking Forums

Networking Forums > Computer Networking > Linux Networking > Can't change the f*@&#ing hostname in RedHat 9

Reply
Thread Tools Display Modes

Can't change the f*@&#ing hostname in RedHat 9

 
 
Tron Thomas
Guest
Posts: n/a

 
      08-09-2003, 08:01 PM
Once upon a time I had an Intel system that I originally installed
RedHat 7.2 on. I managed to get everything setup the way I wanted
including setting the hostname of my computer to what I wanted it to
be called.

I recently upgraded the system to RedHat 9. At some point in time,
I'm not sure when (maybe when I was watching an episode of Futurama),
the operating system decided that I wanted to change me computer name
to dhcppc1. I don't know what made it take a liking to this cryptic
word, but take a liking it did.

Well I have a problem with this because I don't want my computer name
to be dhcppc1. I want it named what I originally named it.

I finally tracked this little dhcppc1 bastard down. He was hiding in
a file named /etc/dhcpcd/dhcpcd-eth0.info where he was resetting the
HOSTNAME environment variable.

So I got rid of his (_|_) and set HOSTNAME entry in the file to what I
wanted it to be. I also reset the HOSNAME variable globally. I
called hostname command again. Everything was great, I could log out
and log back into my X Windows session, and the host name would not
change.

However, when I go to reboot or type the command "/sbin/service
network restart", the operating system looks at the dhcpcd-eth0.info
file and says, "Surely there must be some kind of mistake. The user
couldn't possibly want his HOSTNAME set to that value. I will set it
back to dhcppc1 for him."

And once my network is running again, lo and behold, the hostname is
once again dhcppc1 and so is the HOSTNAME variable entry in the
dhcpcd-eth0.info file.

So, what do I have to do to get the stupid hostname set to what I want
it to?
 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      08-09-2003, 08:07 PM
On 9 Aug 2003 13:01:16 -0700, Tron Thomas wrote:

> So, what do I have to do to get the stupid hostname set to what I want
> it to?





For Redhat/Makdrake here are snippets from my Mandrake files:

cat /etc/sysconfig/network
NETWORKING=yes
FORWARD_IPV4=yes
DHCP_HOSTNAME="dhcppc1"
HOSTNAME=fw.invalid
DOMAINNAME=invalid
GATEWAY=12.209.206.1
GATEWAYDEV=eth0

Anytime you change the above files you need to do a
service network restart

Anytime you change the host name the X server will have
to be restarted.

Do not know if you have to cold start the box when
the hostname changes.

cannonfodder has provided the following for Mandrake users.

Here's a faq on how to change the hostname for a cable modem setup..

http://www.mandrakeusers.org/viewtopic.php?p=36830

Check out our Mandrake Linux Discussion board at
http://www.mandrakeusers.org/index.php
*
Mark Ryan
aka cannonfodder


Today's Tip of the Day, very large
Frequently Asked Questions (faq) Search engine:

http://groups.google.com/advanced_group_search
key word(s) in the first box
*linux* in the Newsgroup, pick English

 
Reply With Quote
 
Tron Thomas
Guest
Posts: n/a

 
      08-10-2003, 11:41 PM
Thanks Bit Twister.

I don't know what happened. Since I've posted my message complaining
about this problem it just went away. When I boot into Linux it comes
up with the correct hostname.

Bit Twister <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> For Redhat/Makdrake here are snippets from my Mandrake files:
>
> cat /etc/sysconfig/network
> NETWORKING=yes
> FORWARD_IPV4=yes
> DHCP_HOSTNAME="dhcppc1"
> HOSTNAME=fw.invalid
> DOMAINNAME=invalid
> GATEWAY=12.209.206.1
> GATEWAYDEV=eth0
>
> Anytime you change the above files you need to do a
> service network restart
>
> Anytime you change the host name the X server will have
> to be restarted.
>
> Do not know if you have to cold start the box when
> the hostname changes.
>
> cannonfodder has provided the following for Mandrake users.
>
> Here's a faq on how to change the hostname for a cable modem setup..
>
> http://www.mandrakeusers.org/viewtopic.php?p=36830
>
> Check out our Mandrake Linux Discussion board at
> http://www.mandrakeusers.org/index.php
> *
> Mark Ryan
> aka cannonfodder
>
>
> Today's Tip of the Day, very large
> Frequently Asked Questions (faq) Search engine:
>
> http://groups.google.com/advanced_group_search
> key word(s) in the first box
> *linux* in the Newsgroup, pick English

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the hostname in linux guddu Linux Networking 3 06-23-2008 12:24 PM
Hostname change G2 Linux Networking 9 12-18-2003 02:28 PM
Can't change hostname in a Samba-Domain pgomez Linux Networking 0 12-08-2003 07:48 AM
change hostname faeychild Linux Networking 9 11-01-2003 03:10 PM
Re: How to change hostname? Xyerp Linux Networking 0 07-04-2003 09:17 AM



1 2 3 4 5 6 7 8 9 10 11