LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   hostname problems (https://www.linuxquestions.org/questions/linux-newbie-8/hostname-problems-41235/)

charlie123 01-12-2003 05:59 PM

hostname problems
 
hi, this problem is confusing me.

when i first set up my internet, and it asked for hostname (optional) i entered 'charlie'. that caused my computer to slow down a lot, whenever i tried to open something it took ages (like 10-20seconds). if at the console i typed 'localhost' it said 'charlie'. i then changed this by doing 'hostname localhost.localdomain' and everything speeded up again and all was well.
however when i reboot my PC, i get an error message when linux boots that goes something like:
Starting lpd: <loads of numbers> bad hostname 'charlie'
and when i get into linux and type 'hostname' at the terminal it says 'charlie' again. i have tried deactivating and deleting the the device in 'Network' and then reinstalling it via the Internet configuration wizard, but it again gets set the hostname of 'charlie'.
i am running redhat 8.0. dont know wot other info is relevant.

i dont understand why it keeps getting changed, and why my computer opens things so slowly when it does. can anyone explain?

what settings do i need to change to fix this?

many thanks,

CHarlie
:newbie:

charlie123 01-12-2003 06:32 PM

hmm i think i *might* have fixed it.
i found the files in /root/.kde and /home/myname/'kde, which were:
socket-localhost.localdomain and tmp-localhost.localdomain also there were two more called charlie instead of localhost.localdomain.
i renamed the charlie ones to backups and restarted. on reboot i was told that 'localhostlocaldomain' (note the missing '.' ) was bad hostname, like before when it was charlie. now im not sure if i had typed hostname localhostlocaldomain accidently some time earlier, so i have yet to reboot and try again, this time renaming the ones without the dot. hopefully that will work.

hmm so much fun trying to fix my mistakes, seriously its so satisfying when i solve a problem, especially if i do it by myself.

*****************EDIT******************

ok it didnt work.

basically this is what is happening:

when linux boots i can see the line:
Setting hostname localhost.localdomain [OK}

then when it gets to
Starting lpd
it comes with the error get_local_host: localhostlocaldomain bad (note the missing dot)

when i load kde and type hostname i can see that it is indeed set to localhostlocaldomain. Now if my hostname is set to anything except localhost.localdomain (note the dot is there) everything is slow to open. but it keeps getting renamed.
also when i load up linux two new directory links appear in /home/myname/.kde and they are:
socket-localhostlocaldomain
tmp-localhostlocaldomain

i dont understand what is going on. im gonna continue trying to figure it out, and i have not yet found any useful information anywhere. does anyone know how i can fix this? thanks :)

CHarlie

neo77777 01-12-2003 08:03 PM

what /etc/hosts tells you?

charlie123 01-13-2003 01:19 AM

thanks for reply :).

127.0.0.1 localhost.localdomain localhost

also my /etc/sysconfig/network says my hostname is localhost.localdomain.

charlie123 01-13-2003 02:55 PM

ok i think it might be ok now, i edited /etc/hosts and /etc/sysconfig/network and changed the hostname to charlie.localdomain. then i ran hostname charlie.localdomain. i then restarted X and it was ok, i have yet to restart my computer tho.

**EDIT**

ok it is fine now, must have just been me being stupid :).
cheers for help :)

CHarlie


All times are GMT -5. The time now is 07:39 AM.