LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   machine name changed by DHCP (https://www.linuxquestions.org/questions/linux-general-1/machine-name-changed-by-dhcp-38812/)

serquicia 12-18-2002 06:52 PM

machine name changed by DHCP
 
I'm running RH8 with a cable modem. Each time I turn on my PC the name of it changed to something that it is set by my ISP. When I log in to GNOME it says that it could'n find and address or something like it for the name of my machine. How can I fix it?

nxny 12-18-2002 07:51 PM

Try setting your hostname in /etc/sysconfig/network

It should look something like..
NETWORKING=yes
HOSTNAME=myhostnamewithoutdomain

Could you post what your
/etc/sysconfig/network-scripts/ifcfg-eth0
says? I just want to find out if we need to make a tweak there.

serquicia 12-18-2002 08:04 PM

My /etc/sysconfig/network-scripts/ifcfg-eth0 says:

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet

and my /etc/sysconfig/network says:

NETWORKING=yes
HOSTNAME=localhost.localdomain

nxny 12-18-2002 09:14 PM

su -
to become root temporarily. Supply root password

Go ahead and change your HOSTNAME entry in /etc/sysconfig/network to whatever you want it to be.

HOSTNAME=pluto

and then add a line to your /etc/hosts so it would look something like ..

127.0.0.1 localhost
127.0.0.1 pluto.mydomain.com pluto

now type in
/sbin/service network restart

exit root shell using Ctrl-D

type in
hostname
and see what it says.

serquicia 12-18-2002 09:53 PM

That worked great.

I did that through System Settings -> Network.

Under DNS I put "pluto" as my Hostname.

Then under hosts I put:
IP: 127.0.0.1 Name: pluto.provider.com Aliases: pluto

Thanks


All times are GMT -5. The time now is 03:40 PM.