Public bug reported:

Binary package hint: gnome-system-tools

Note:  I have encountered these problems on each machine on which I've
installed Hardy where I have a dual-NIC machine and I elect to use the
eth1 as the only active NIC.

These problems occur on a freshly installed Hardy box with two NICs:
eth0 is onboard and unused, eth1 is a PCI-based NIC and is the one that
is connected to the LAN.

/etc/hosts immediately after the installation contains the following (ignoring 
the IPv6 stuff):
127.0.0.1 localhost
127.0.1.1 boxname

I am assuming that "boxname" is under 127.0.1.1 because eth1 is the
active NIC.  I am not sure about this.

At this point in network-manager under Connections I add the appropriate
static IP address to eth1.  This works as evidenced by changes made to
/etc/network/interfaces and the output from ifconfig -a.

Setting the domain name under the general tab in network-admin changes 
/etc/hosts to the following:
127.0.0.1 localhost boxname.example.com
127.0.1.1 boxname.example.com

Any attempts at putting boxname in the hosts file using network-admin's
host tab result in "boxname.example.com" being put in the file instead.
Using network-admin, there is no way to add boxname as a non-FQDN name
in /etc/hosts as an alias to either localhost (127.0.0.1) or
boxname.example.com (127.0.1.1).  I consider appending the domain name
wrong in this context, in that it only appends the domain name for
boxname.  Any other host that I define an address for in this manner
does not automatically have the domain name appended.

Attempting a sudo at this point:
sudo: unable to resolve host boxname

Any gksudo attempt hangs indefinitely.

Checking /etc/resolv.conf shows that it is correct:
domain example.com
nameserver 10.11.12.13

"hostname" returns the non-FQDN hostname.

pinging the non-FQDN hostname results in
ping: unknown host boxname

pinging boxname.example.com is successful, however.  So is pinging the
static IP address I assigned to eth1.  I cannot ping any other machines
by name or by IP address, however, even though ifconfig eth1 shows that
the interface is up.

/etc/nsswitch.conf indicates that the hosts file is to be used before
DNS for hostname resolution.  This works only for hostnames not
associated with the loopback addresses.  However, pings do not work to
these non-local names, even though their addresses are resolved from the
hosts file.

Another interesting note:  eth0 is up, even though it's not configured
in my case.  There's no way to switch it off (ifconfig down) with
network-manager either.  Unchecking "roaming mode" requires some level
of configuration be done to the interface, which I don't want/need to
do.  I merely want it down.

My observations are that there are several issues that could be resolved
simply by two things:  First, assign the FQDN and it's non-FQDN both to
the 127.0.0.1 loopback interface, not the 127.0.1.1.  Second, any
network interface should be able to be disabled via network-manager.

My fix in a previous instance for these problems was to disable the
unused onboard NIC in the BIOS and fixing /etc/hosts and
/etc/network/interfaces to reflect the now single-NIC (eth0)
configuration.  I'd rather work through a configuration fix for this
without the BIOS manipulation.  This would probably involve rebooting
the machine into recovery mode, hand editing /etc/hosts with the non-
FQDN name of the machine associated with 127.0.0.1 (not 127.0.1.1) and
possibly hand editing /etc/network/interfaces to make sure that eth0 is
down at boot.

** Affects: gnome-system-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
network-admin fails to correctly edit /etc/hosts, causes sudo to fail
https://bugs.launchpad.net/bugs/234111
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to