LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Knoppix Changed Hostname (https://www.linuxquestions.org/questions/linux-software-2/knoppix-changed-hostname-272226/)

deadlove75 12-31-2004 02:08 AM

Knoppix Changed Hostname
 
Hell-o,

After I booted Knoppix from a disc, my hostname in Mandrake 10.1 changed to "name"@Knoppix. I am on a cable modem with dhcp. How do I get my previous hostname back?


Thanks,

Jason Hodges

qazzaq 12-31-2004 07:47 AM

Check /etc/sysconfig/network

deadlove75 01-02-2005 11:15 PM

Quote:

Originally posted by qazzaq
Check /etc/sysconfig/network
I did. It shows my orignal hostname, not Knoppix. Any other ideas?


Blessed Be,

Jason Hodges

pretty.tulip 04-02-2006 06:33 PM

Hello Deadlove, i m having a problem similar to yours on RedHad enterprise 4, I m not sure of the reason, one day the host name on the command prompt has changed to be root@dhcppc0:~ although at the time, I didn't try to work on dhcp (I m still in learning stage, & sometimes I make trials utilizing my few resources just to practise like making DNS using IP alias). Any way, I checked /etc/sysconfig/network & /etc/hosts & the host name in both is the old one: localhost@localdomain localhost. I m wondering how could you solve this problem???
Thank you

deadlove75 04-10-2006 12:15 PM

Quote:

Originally Posted by pretty.tulip
Hello Deadlove, i m having a problem similar to yours on RedHad enterprise 4, I m not sure of the reason, one day the host name on the command prompt has changed to be root@dhcppc0:~ although at the time, I didn't try to work on dhcp (I m still in learning stage, & sometimes I make trials utilizing my few resources just to practise like making DNS using IP alias). Any way, I checked /etc/sysconfig/network & /etc/hosts & the host name in both is the old one: localhost@localdomain localhost. I m wondering how could you solve this problem???
Thank you

I never did solver the problem directly. But I ended up getting a router and that solved the problem. In the host file, I put the new name of the computer and the IP address that the router assigned to the computer and that fixed it. I had to put the second computer on my network's name and ip address in the host file and that's why I changed the other one.

If you have a fixed IP address, you might want to put your computers name and that IP in your host file and remove the localhost stuff. Please back up your file before you do that; I'm not really sure what it'll do. If your IP address changes, you may not be able to get online until you change your host file and put the new IP address in.

It was something that I learned to live with. If it really bothers you, you may want to get a router. It's nice to have one just for security reasons.


Blessed Be,

Jason Hodges


All times are GMT -5. The time now is 12:41 AM.