Rename local machine
I have a small network with several win machines. They all have a unique name. The network is connected to a router which gives a connection to a cable network. The router is configured to give dynamical addresses. Network is up and running. No Problems.
I have a laptop with red hat9 works fine, I can access INTERNET by the router. I intend to use samba to use the laptop as a workstation on the win network. By the installation, this laptop got obvious the name localhost.localdomain. Typing HOSTNAME in the console localhost.localdomain is the reply. Using Hostname to change the name, changes the name only for the session but it also blocks the console. You can't open a new one or you can't open the conso;e anymore (at that session). This name is also on the tab of the network configuration utility. Changing this name on this tab gives an error. I thought perhaps I have also to change the HOST file in /etc/. Is it possible to change this name? Say I want to call the computer ADAM , can I change it this way, or are there more complications.(other files to change perhaps? The tab on the network configuration?) CB |
As far as I know, you can change the host name in the /etc/hostname file, then restart the network. (/etc/init.d/network restart)
Don't forget to restart the network. Worst case: change the file and reboot (which will guarentee the network restarts <grin>) |
To change your hostname in RedHat, take a look at this thread.
http://www.linuxquestions.org/questi...threadid=87488 |
Quote:
But on the tab DNS in the NETWORK CONFIGURATION I have still localhost....... Can I change this without consequenses? CB |
Quote:
This name is obtain from the /etc/sysconfig/network file. Make sure that the name in /etc/sysconfig/network and /etc/hosts is the same. Did you restart the network service (or even better, reboot) ? Code:
service network restart |
Quote:
The problem is solved, I editted the DNS tab and everything is still working (I have a nice backup on an USBdrive) Thanks a lot! CB |
:newbie: I've tried and tried to rename my hostname.:cry:
so here's what I've done 1.) i've edited the HOSTNAME line in /etc/sysconfig/network file to look like this: HOSTNAME=maulux 2.) I've edited /etc/hosts file to look like this 127.0.0.1 localhost.localdomain localhost maulux 3.) then I did the network restart dance service network restart I started I restarted I even farted :rolleyes: but still :confused: when I type hostname I get carmichs-dk.search.corpsys.p4pnet.net life shouldn't be this hard to change your host name. why?!!? someone please tell me? :cry: |
Reboot the PC.
|
I am having a similar problem in MDK 9.1 I get a hostname from my cable modem. Even though /etc/sysconfig/network shows the correct hostname. I have restarted/rebooted/reinstalled all with the same result. I can make a temp fix by stop i'net link issue hostname newhostname, restartinternal network. Hostname is now correct, but when I restart the external (i'net) interface the hostname reverts to a long string dexfribing my location on the cable modem's network.
Many thanks for any help Rgds John |
To you who where having problems: try setting the hostname manually by typing "hostname -v <hostname>" , then typing "hostname" to see if it works, and then reboot and see if it stays.
|
All times are GMT -5. The time now is 09:17 AM. |