Prevent network setup from changing the hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



How can I block network setup (via NetworkManager) from changing
the machine's hostname whenever the network configuration changes?

The problem: When my graphical login session starts, the xauth
database gets an token that is labeled with the hostname at that
time. If there is not yet a network connection, that will be
"localhost.localdomain". When a network connection is then made
(my wireless connection needs the key from my login), the hostname
changes. That breaks X session sharing because there is no xauth
token that matches the current hostname. If I get a root shell
with "su -", commands launched from that shell cannot access the
display. If I set up an ssh connection with "ssh -X", I get a
complaint about missing xauth data.

On systems with an "ONBOOT=yes" network connection, there is no
problem since the hostname is set before the X session starts.
It's just when the hostname changes during the X session that
there is a problem.

I am running CentOS 6, fully updated. It's taken me a long time
to track down the root cause of this problem. Now I just need a
solution, preferably something less ham-fisted than "xhost -".

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux