hardy: sudo breaks when the domain is changed in network admin panel

Bug #208947 reported by ArbitraryConstant
4
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
New
Undecided
Unassigned
Nominated for Hardy by Sitsofe Wheeler

Bug Description

Binary package hint: network-manager

Description: Ubuntu hardy (development branch)
Release: 8.04

network-manager:
  Installed: 0.6.6-0ubuntu4
  Candidate: 0.6.6-0ubuntu4
  Version table:
 *** 0.6.6-0ubuntu4 0
        500 http://ca.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

This was a fresh install.

I changed the domain name in the network admin panel. After that, "sudo" did not work on the command line. It fails with the following error:

arbitrary@hardy-vm:~$ sudo su
sudo: unable to resolve host hardy-vm

No possible network configuration should ever under any circumstances cause sudo to stop working, and I therefore consider this to be a bug.

My /etc/hosts file contained:

127.0.0.1 localhost
127.0.1.1 hardy-vm.priv

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Manually adding "hardy-vm" to this file via the network manager fixed the problem, I was still able to authenticate with the network panel GUI.

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

I have just run into a variation of this problem.

Steps to reproduce:
1. Press the right mouse button over nm-applet.
2. Untick "Enable Networking".
3. Start Applications -> Accessories -> Terminal.
4. Type
sudo -s
.

Expected result:
Prompt for user's password to appear.

Actual result:
The following is displayed:
sudo: unable to resolve host <hostname>

How reproducible is the problem?
The problem is reproducible every time.

Additional information:
Restarting networking normally allows sudo to start working again. However if the user has set NetworkManager to use Manual Configuration sudo may very well not work again until the system is rebooted.
Version information:
Ubuntu hardy (development branch)
network-manager 0.6.6-0ubuntu4

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.