You are not logged in.
Hi!
I have a strange problem with networkmanager
It changes my computer's hostname to "localhost" by modifying my /etc/hosts file
here it is:
[ovca@localhost ~]$ cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 localhost.lan localhost.localdomain localhost
#<ip-address> <hostname.domain.org> <hostname>
# End of file
127.0.0.1 livada # added by Apache Friends XAMPPI want my hostname to be "livada" so I modified it accordingly
[ovca@localhost ~]$ cat /etc/hosts
#<ip-address> <hostname.domain.org> <hostname>
# End of file
127.0.0.1 livada # added by Apache Friends XAMPPAfter reboot, computer asks me to enter my livada login:
i enter and then it then prompts me to:
ovca@localhost
Again my cat /etc/hosts says
[ovca@localhost ~]$ cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 localhost.lan localhost.localdomain localhost
#<ip-address> <hostname.domain.org> <hostname>
# End of file
127.0.0.1 livada # added by Apache Friends XAMPPIt all began an hour ago when I replaced Wicd with networkmanager (becouse i couldnt get an IP from my colledge wireless network's DHCP) I followed this tutorial: http://wiki.archlinux.org/index.php/NetworkManager
(yes, my rc.config
HOSTNAME="livada")
Any suggestions? This is frustrating ![]()
Last edited by Vunovati (2009-12-01 02:23:07)
Arch + awesome + urvxt
Offline
Ok, now I modified my /etc/hosts to
127.0.0.1 livada
And made it immutable
sudo chattr +i /etc/hosts
as suggested in:
http://ubuntuforums.org/showthread.php?t=554771
But, still no progress
My hostname is still localhost, and I can do nothing about it ![]()
So maby the problem is not in /etc/hosts but in something else
Suggestions?
Help please ![]()
Arch + awesome + urvxt
Offline
Did you set the same hostname in
/etc/NetworkManager/nm-system-settings.conf
Reference:
http://wiki.archlinux.org/index.php/Net … t_hostname
Last edited by MadTux (2009-11-19 17:54:34)
Offline
are you sure that is networkmanager? what about the comment # added by Apache Friends XAMPP ?
Give what you have. To someone, it may be better than you dare to think.
Offline
Did you set the same hostname in
/etc/NetworkManager/nm-system-settings.conf
Reference:
http://wiki.archlinux.org/index.php/Net … t_hostname
Yes, I forgot to mention
[main]
plugins=keyfile
[keyfile]
hostname = livadaare you sure that is networkmanager? what about the comment # added by Apache Friends XAMPP ?
Removed it, but still no luck, I guess it was just a comment ![]()
Any ideas where else could I look or modify my hostname?
Last edited by Vunovati (2009-11-19 18:10:41)
Arch + awesome + urvxt
Offline
is not a simple comment. its says that xampp added that line there ![]()
look at the messages when you starting xampp you'll see something like:
XAMPP: Your /etc/hosts is not okay. I will fix it.P.S you might want to fix your /etc/hosts. this is not valid
127.0.0.1 localhost.lan localhost.localdomain localhostLast edited by wonder (2009-11-19 18:16:00)
Give what you have. To someone, it may be better than you dare to think.
Offline
is not a simple comment. its says that xampp added that line there
look at the messages when you starting xampp you'll see something like:
XAMPP: Your /etc/hosts is not okay. I will fix it.P.S you might want to fix your /etc/hosts. this is not valid
127.0.0.1 localhost.lan localhost.localdomain localhost
Okay, I removed everything. now i'm just left with
127.0.0.1 livadaas it is supposed to be I guess ![]()
Still my login name doesn't change
Also if i leave my /etc/hosts without immutating it, something adds a line
127.0.0.1 localhost.lan localhost.localdomain localhostat the beginning of the file.
Where else can I configure my hostname ? ![]()
Last edited by Vunovati (2009-11-19 19:26:40)
Arch + awesome + urvxt
Offline
is not a simple comment. its says that xampp added that line there
look at the messages when you starting xampp you'll see something like:
XAMPP: Your /etc/hosts is not okay. I will fix it.P.S you might want to fix your /etc/hosts. this is not valid
127.0.0.1 localhost.lan localhost.localdomain localhost
I guess, thats the problem here. In his inital post he says that something is modifying /etc/hosts.
Offline
Okay, I removed everything. now i'm just left with
127.0.0.1 livadaas it is supposed to be I guess
My /etc/host looks like this
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost D5150
# End of file
Where D5150 is my hostname.
Offline
You probably don't want to remove 'localhost' from your hosts file. From the "Beginner's Guide":
Note: This format, including the 'localhost' and your actual host name, is required for program compatibility! So, if you have named your computer Archhost, then that line above should look like this:
127.0.0.1 localhost.localdomain localhost livadaMan. MadTux just beat me to practically the same thing. Heh. Hope it helps!
Last edited by llcawthorne (2009-11-19 18:44:31)
To understand recursion, you must understand recursion.
Offline
You probably don't want to remove 'localhost' from your hosts file. From the "Beginner's Guide":
Note: This format, including the 'localhost' and your actual host name, is required for program compatibility! So, if you have named your computer Archhost, then that line above should look like this:
127.0.0.1 localhost.localdomain localhost livadaMan. MadTux just beat me to practically the same thing. Heh. Hope it helps!
Yes, man , i am reaaaallly fast in typing.
Offline
Vunovati wrote:Okay, I removed everything. now i'm just left with
127.0.0.1 livadaas it is supposed to be I guess
My /etc/host looks like this
#
# /etc/hosts: static lookup table for host names
##<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost D5150# End of file
Where D5150 is my hostname.
Yep, I did it the way you told me
What i get now is:
#
# /etc/hosts: static lookup table for host names
#
127.0.0.1 localhost.localdomain localhost
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost livada
# End of fileif I delete
127.0.0.1 localhost.localdomain localhostand Immute the file with
sudo chattr +i /etc/hostsafter I reboot
it remains:
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost livada
# End of fileBut still, i end up with ovca@localhost ![]()
Arch + awesome + urvxt
Offline
Anyway I must say that I gave up on networkmanager. Now I simply use dhcpd wlan0 to connect anywhere, the arch way ![]()
The solution to networkmanager changing my config file was to make it immutable as described above ![]()
Arch + awesome + urvxt
Offline
After reboot, computer asks me to enter my livada login:
i enter and then it then prompts me to:
ovca@localhostAgain my cat /etc/hosts says
[ovca@localhost ~]$ cat /etc/hosts
Interesting though that /etc/hosts has nothing to do with the host name being shown at your login or shell prompt. Your host name is set by the "hostname" command, or in /proc/sys/kernel/hostname.
Offline