[hardy] Manually Configuring Network Causes Massive, Unreversable, Failure

Reported by Ross Peoples on 2008-01-23
26
Affects Status Importance Assigned to Milestone
Ubuntu
High
Unassigned
Nominated for Hardy by SteBo

Bug Description

Binary package hint: network-manager

After installing a fresh Kubuntu Hardy Alpha 3 on a second hard drive, I changed my network configuration to a manually configured IP address. Soon after, applications refused to run, networking stopped working altogether, and when I went to restart networking from Konsole using "sudo /etc/init.d/networking restart", I got this error: "sudo: unable to resolve host ross-desktop". Obviously, my alias to 127.0.0.1 got knocked out. So I booted into recovery mode and fixed my "/etc/hosts" file to include the correct alias. I rebooted back into KDE to find KNetworkManager saying "No Network Device Found". Going into the Network configuration, my device is listed and enabled, yet, I have no access to the internet. I switched my networking back to DHCP, which returned a private address (169.*.*.*). Switching back to the manual configuration, I am able to access the internet, but I am now getting the same error from sudo.

I cannot do any updates because Adept refuses to run and I obviously can't run "apt-get install update" without sudo, so right now I have a brand new HOSED system. The only choice I have right now is to wipe it and reinstall, and just let it sit in DHCP until I run all the updates. After that, I'll try the switch to manual configuration again, and if it hoses my system again, I will be furious.

P.S: All I wanted to do was try out KDE4 and the new 2.6.24 kernel...is that so much to ask?

dlgandalf (gandalf-die-laterne) wrote :

this bug is real, I ran into it many times now.
Btw, can someone tell me if it is necessary for the hosts file to have the rule

127.0.0.1 localhost <hostname-name>

with the emphasis on the name between '<>'

btw Mr Peoples you can still use 'su' -command, you don't have to do a recovery mode

Changed in network-manager:
assignee: nobody → gandalf-die-laterne
status: New → Confirmed

Well, since I didn't set the root password, the only way for me to use
su was through sudo. But thanks for confirming this...glad to know I'm
not crazy.

dlgandalf wrote:
> this bug is real, I ran into it many times now.
> Btw, can someone tell me if it is necessary for the hosts file to have the rule
>
> 127.0.0.1 localhost <hostname-name>
>
> with the emphasis on the name between '<>'
>
> btw Mr Peoples you can still use 'su' -command, you don't have to do a
> recovery mode
>
> ** Changed in: network-manager (Ubuntu)
> Assignee: (unassigned) => dlgandalf (gandalf-die-laterne)
> Status: New => Confirmed
>
>

SteBo (stebo) wrote :

I ran into this after changing the hostname of a Hardy machine (dist-upgraded yesterday) with KNetworkManager. The /etc/hosts file did not contain the new hostname after this and because of this sudo refused working from then on. One needs to boot into recovery mode or with a live CD to fix this problem by correcting /etc/hosts.

Michael James (mbj1103) wrote :

I, too, confirm this bug. It worked fine in Gutsy; and the network manager edits the /etc/hosts file so that the first two lines look like:

172.0.0.1 localhost [hostname].[domain]
172.0.1.1 [hostname].[domain]

The second ".[domain]" should not be added; this is the part the messes with sudo.

Sitsofe Wheeler (sitsofe) wrote :

Wait! I think this is in the wrong package which is why no-one is looking at it. Attempting a punt to gnome-system-tools ...

Sebastien Bacher (seb128) wrote :

kubuntu doesn't use gnome admin tools, reassigning to kde

The problem occurred for me on gnome.

SteBo (stebo) wrote :

This happens with KDE and Gnome, so it is probably a network-manager backend issue.

SteBo (stebo) on 2008-04-15
Changed in network-manager:
assignee: gandalf-die-laterne → asac
Michael Vogt (mvo) wrote :

At least parts of the problem are releated to:
https://bugs.edge.launchpad.net/ubuntu/+source/sudo/+bug/32906

The interaction with sudo is a very inconvenient, very visible symptom. Without getting into whether or not it's desirable for sudo to do the gethostbyname() lookup, we can say for certain that it is never the correct behavior for a configuration GUI used by the user to produce an incorrect /etc/hosts file. If gethostbyname() were removed from sudo, we would still have a broken /etc/hosts file, and there would still be bugs resulting from that.

Ross Peoples (deejross) wrote :

Agreed. The problem should be fixed at the source instead of putting a band-aid on the symptoms as they appear.

Bryce Harrington (bryce) on 2008-04-24
Changed in network-manager:
importance: Undecided → High
Paul Smith (psmith-gnu) wrote :

It's not just "manual configuration" that causes this failure. I had this exact thing happen to me when I tried to reconfigure my network interface via the System -> Administration -> Network tool. I disabled roaming mode and enabled DHCP... and NetworkManager whacked my /etc/hosts file so that I could no longer use sudo. See bug 214360

Matt Zimmerman (mdz) wrote :

This bug, as originally reported, affects the KDE 4 Remix of Kubuntu, not the 8.04 release itself. Moving to kde4 for further analysis and reassignment, as it seems unlikely to be a network-manager problem.

There is at least one comment reporting a problem on GNOME, which is surely a different bug and should be filed separately.

Changed in network-manager:
assignee: asac → nobody
gmcalp (geoff-mcalpin) wrote :

I can also confirm that it isn't just KDE that is having this problem. I just ran into it today using network-anager under GNOME. How it happened for me was to switch from 'roaming' to use DHCP... I too am getting the "sudo: unable to resolve host geoff-laptop" error when trying to sudo.

I am using the LTS Hardy release.

Paul Smith (psmith-gnu) wrote :

I was the other Ubuntu (Gnome) poster. gmcalp's description is _exactly_ what happened to me. I'm surprised anyone has any problems reproducing it: it seems to happen 100% of the time and recipe is very simple.

Ross Peoples (deejross) wrote :

Actually Matt, the bug took place while using KDE3...I ran into the bug while assigning the machine a static ip, which is the first thing I do after installing any OS. So I hadn't even gotten to the process of installing the KDE4 packages when KDE3's network manager hosed my system.

Ross Peoples (deejross) wrote :

The bug actually occurred in KDE3, not KDE4. Setting to network-manager since it affects Gnome as well as KDE.

> There is at least one comment reporting a problem on GNOME, which is surely a different bug and should be filed separately

No need. I submitted 208947 with Gnome, and it was marked as a duplicate of this bug. Given identical corruption of /etc/hosts under similar circumstances, that's probably correct.

If 208947 is a different bug, then it's not a duplicate. Since the symptoms are identical, it should also be given a "high" priority.

Sitsofe Wheeler (sitsofe) wrote :

The problem is that under GNOME it is not network-manager that sets static configurations - it is gnome-system-tools... The question is whether the KDE equivalent uses the same backend. Either way I doubt network-manager is the right place for this bug...

Perhaps, but as I said if the same symptoms are caused by two different bugs then it is certainly not appropriate to mark reports of this issue in Gnome as duplicates of this bug, which is what has happened to date.

If this bug is to be transferred to KDE, then revive 208947 or tell me to re-file it. It's as simple as that.

Sitsofe Wheeler (sitsofe) wrote :

ArbitraryConstant:
I'm not disagreeing with you - I think this should have been two bugs myself (unless the backend is in some way shared between KDE and GNOME) but we shall see.

I can confirm this bug in Hardy-Gnome. If a domain is added to the hostname in /etc/hosts, sudo does not work any more. In Gutsy that did not matter; sudo still worked even if a domain name was added:

172.0.0.1 localhost [hostname].[domain]

I think, the problem is not, how the domain name has been added. It is rather how /etc/hosts is parsed.

A simple workaround to edit /etc/hosts without rebooting in recovery mode (as described above) is to open an administration terminal from the main menue. This is possible without any sudo command and does still work.

Alexander Sack (asac) wrote :

not a network manager bug. most likely a kde admin or ifupdown issue.

> most likely a kde admin or ifupdown issue.

There are many, many confirmations under Gnome.

Skye (sberghel+launchpad) wrote :

This is a network manager bug, as it affects a Gentoo system of mine running Gnome. The problem is that Network Manager "helpfully" sets the hostname, which confuses a lot of programs.

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

Duplicates of this bug

Other bug subscribers