HOSTNAME shows as none from terminal
Hi All,
I had always worked fine with my Red hat 4.0 untill yesterday night when i logged in i had an error saying: "HOSTNAME could not be found, you can resolve this by editing the /etc/hosts" eventually it logged me in but when i launch the terminal ...i now see 'username@(none)dir' . In other words my HOSTNAME shows as 'none'. I looked into /etc/hosts file but everything looks the same, which for is: 127.0.0.1 mluboya When i look into network configuration, my host is well: mluboya Could someone please help !!! Thank you |
Have you tried setting the hostname ?
As root : hostname your_host_name This is temporary until a reboot, you need it in the /etc/hosts file too. Also, a hostname is usually like host.domain.tld I don't know if a single word will work. Even the default is localhost.localdomain regards Alan |
Your host name is stored in the file /etc/hostname not /etc/hosts
You need to find out how this change to your system happened... Have you been compromised? |
Note that hostname doesn’t change anything permanently.
After reboot original names from /etc/hosts are used again. From man hostname fedora 12 There are several places it needs setting, but they can all be done from GUI components. I pointed out in your other post that you have probably been rooted. |
HOSTNAME shows as none from terminal
Thanks All for replies:
currently im unable to login as normal user, so i logged in as Root and tried to change /etc/hosts with following contents: 127.0.0.1 localhost.localdomain i also change the hostname with: hostname localhost.localdomain The changes have been made but when i reboot, HOSTNAME on my terminal still shows as NONE when i looked into the /var/log/messages, i think the problem lies with these errors i found: ifup: Missing config file ifcfg network: bringing up loopback interface: FAILED my ethernet card is fine cause i use dual boot on this laptop and on windows ethernet is ok. Please, do you know how can we go about it ? Thanks |
Make sure there is a hostname set in /etc/HOSTNAME (case sensitive).
Also, make this line in /etc/hosts: Quote:
Quote:
|
HOSTNAME shows as none from terminal
Hi camphor,
Thanks for the reply... i did what you said but still same error. i first more /etc/HOSTNAME but its not there so i vi it and filled it with: 127.0.0.1 localhost.localdomain localhost i did the same with /etc/hosts. But still same error ... :confused: |
HOSTNAME shows as none from terminal
Any ideals guys..???
Please help ... |
Have you checked your system out yet ? Your external USB drive stopped connecting and your hostname (and ifcfg) have disappeared. Things like that just don't happen.
Get a live cd and run virus checks and rootkit checks before you go any further. I suggest INSERT http://www.inside-security.de/insert_en.html Use chkrootkit to see if your files have been rooted. |
All times are GMT -5. The time now is 06:56 PM. |