sudo broken after upgrade from gutsy to hairy^Whardy

I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo. When I try to use sudo it says: sudo: unable to resolve host calc calc being the hostname of this machine. How do I fix this? I guess adding the hostname to /etc/hosts would fix it but I can't do that because sudo is broken. Also I haven't set up a root account on this machine. Aside from booting from a rescue disk is there any other way to fix this? Glenn -- Glenn Ramsey <glenn(a)componic.co.nz> 07 8627077 http://www.componic.co.nz

I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo.
When I try to use sudo it says:
sudo: unable to resolve host calc
calc being the hostname of this machine.
How do I fix this? I guess adding the hostname to /etc/hosts would fix it but I can't do that because sudo is broken. Also I haven't set up a root account on this machine.
Aside from booting from a rescue disk is there any other way to fix this?
Quite a few people seem to have experienced this problem: https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/195308 Using "gksudo" seems to work for some people: https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/195308/comments/3 Also, have you tried booting in failsafe mode? HTH Cheers, Peter -- Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ http://www.cs.waikato.ac.nz/~fracpete/ +64 (7) 838-4466 Ext. 5174

Peter Reutemann wrote:
I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo.
When I try to use sudo it says:
sudo: unable to resolve host calc
calc being the hostname of this machine.
How do I fix this? I guess adding the hostname to /etc/hosts would fix it but I can't do that because sudo is broken. Also I haven't set up a root account on this machine.
Aside from booting from a rescue disk is there any other way to fix this?
Quite a few people seem to have experienced this problem: https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/195308
Using "gksudo" seems to work for some people: https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/195308/comments/3
Also, have you tried booting in failsafe mode?
HTH
Cheers, Peter
Thanks Peter, I'd forgotten that failsafe mode gives you into a root shell. For anyone who's interested in /etc/hosts I changed the line 127.0.0.1 localhost to 127.0.0.1 localhost calc Glenn -- Glenn Ramsey <glenn(a)componic.co.nz> 07 8627077 http://www.componic.co.nz

2008/4/30 Glenn Ramsey <glenn(a)componic.co.nz>:
I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo.
When I try to use sudo it says:
sudo: unable to resolve host calc
calc being the hostname of this machine.
How do I fix this? I guess adding the hostname to /etc/hosts would fix it but I can't do that because sudo is broken. Also I haven't set up a root account on this machine.
Aside from booting from a rescue disk is there any other way to fix this? <http://list.waikato.ac.nz/mailman/listinfo/wlug>
When you firs boot up, pich the rescue option from grub menu and you should drop right to a rootshell, you can edit /etc/hosts from there. Alternatively; press 'e' on the option you normally boot from, from the next menu choose the line that begins with 'kernel .. ' press 'e' again to edit that line... delete 'quiet splash' from the end and type 'init=/bin/bash' instead. When you've done that, press enter then 'b' to boot. After a few seconds you'll be in bash with a root prompt. # mount / -o remount,rw # nano /etc/hosts make sure there's a line that reads "127.0.1.1 hostname", then save it. # mount / -o remount,ro press ctrl-alt-delete and boot normally.

On Wed, Apr 30, 2008 at 2:22 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
2008/4/30 Glenn Ramsey <glenn(a)componic.co.nz>:
I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo.
When I try to use sudo it says:
sudo: unable to resolve host calc
calc being the hostname of this machine.
How do I fix this? I guess adding the hostname to /etc/hosts would fix it but I can't do that because sudo is broken. Also I haven't set up a root account on this machine.
Aside from booting from a rescue disk is there any other way to fix this? <http://list.waikato.ac.nz/mailman/listinfo/wlug>
When you firs boot up, pich the rescue option from grub menu and you should drop right to a rootshell, you can edit /etc/hosts from there.
Alternatively;
press 'e' on the option you normally boot from, from the next menu choose the line that begins with 'kernel .. ' press 'e' again to edit that line... delete 'quiet splash' from the end and type 'init=/bin/bash' instead. When you've done that, press enter then 'b' to boot.
After a few seconds you'll be in bash with a root prompt.
# mount / -o remount,rw
# nano /etc/hosts make sure there's a line that reads "127.0.1.1 hostname", then save it.
*brain-break* Shouldn't that be 127.0.0.1?
-- James Pluck PalmOS Ergo Sum "Dear IRS: I would like to cancel my subscription. Please remove my name from your mailing list..."

On Wed, Apr 30, 2008 at 02:26:12PM +1200, Bruce Kingsbury wrote:
*brain-break* Shouldn't that be 127.0.0.1?
Nope. 127.0.1.1
To clarify this, the loopback device is technically 127.x.x.x/8, so nearly anything starting with "127." will work. I assume the reason for assigning the hostname to something other than 127.0.0.1 is so that 127.0.0.1 is only "localhost" unambiguously. John

On Wed, Apr 30, 2008 at 2:26 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
*brain-break* Shouldn't that be 127.0.0.1?
Nope. 127.0.1.1
Why is Localhost 1.1 in Ubuntu instead of 0.1 as is the norm?
Enquiring minds and all that :) -- James Pluck PalmOS Ergo Sum "Dear IRS: I would like to cancel my subscription. Please remove my name from your mailing list..."

On 30/04/2008, at 2:45 PM, James Pluck wrote:
On Wed, Apr 30, 2008 at 2:26 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
*brain-break* Shouldn't that be 127.0.0.1?
Nope. 127.0.1.1
Why is Localhost 1.1 in Ubuntu instead of 0.1 as is the norm?
Enquiring minds and all that :)
127.0.0.1 is localhost 127.0.1.1 is "name of machine"

2008/4/30 James Pluck <papabearnz(a)gmail.com>:
On Wed, Apr 30, 2008 at 2:26 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
*brain-break* Shouldn't that be 127.0.0.1?
Nope. 127.0.1.1
Why is Localhost 1.1 in Ubuntu instead of 0.1 as is the norm?
Enquiring minds and all that :)
localhost is still 127.0.0.1, the name of the machine is 127.0.1.1 And I have no idea why. Googling only comes up with problems caused by it.. no explanation of why they set things up this way.

On Wed, Apr 30, 2008 at 2:48 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
2008/4/30 James Pluck <papabearnz(a)gmail.com>:
On Wed, Apr 30, 2008 at 2:26 PM, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
*brain-break* Shouldn't that be 127.0.0.1?
Nope. 127.0.1.1
Why is Localhost 1.1 in Ubuntu instead of 0.1 as is the norm?
Enquiring minds and all that :)
localhost is still 127.0.0.1, the name of the machine is 127.0.1.1
Ahh! I wasn't aware of that. I learned something today *grin* And I have no idea why. Googling only comes up with problems caused by it..
no explanation of why they set things up this way.
Hmmm - interesting. -- James Pluck PalmOS Ergo Sum "Dear IRS: I would like to cancel my subscription. Please remove my name from your mailing list..."

2008/4/30 Glenn Ramsey <glenn(a)componic.co.nz>:
I just upgraded a spare box, to see if it's safe to upgrade my main machine, and the upgrade has broken sudo.
After a couple of upgrades going wrong, I've decided to only do fresh installs, which is OK if you have spare disk space. Installed 8.04 last night, and it picked up my accounts from the 7.10 installation - and it looks as if I can still run 7.10, although I haven't tried it yet. Screen resolution is less than satisfactory, only getting 1280x900. The suggestion of loading a proprietary driver almost turned to custard, so I'm back to square one. Have found the new system of not automounting online disks is a bit of a pain - and also having the system of having them listed anonymously (only by size). Mount point now depends on order the disks are mounted - not the device name as in previous version, so names are not necessarily consistent from session to session. Michael

I see now that 8.04 is using GVFS. Could someone explain what it is in layman's terms? Also, why is my home directory now no longer on /dev/hda4 (which is where /home was located before), and instead what seems to be a virtual file system on /dev/hda3 (the / partition). The output of 'df -B M' is as follows (user name replaced with <user>): Filesystem 1M-blocks Used Available Use% Mounted on /dev/hda3 23651M 6418M 16042M 29% / varrun 696M 1M 696M 1% /var/run varlock 696M 0M 696M 0% /var/lock udev 696M 1M 696M 1% /dev devshm 696M 1M 696M 1% /dev/shm lrm 696M 38M 659M 6% /lib/modules/2.6.24-16-generic/volatile gvfs-fuse-daemon 23651M 6418M 16042M 29% /home/<user>/.gvfs /dev/hdc 4027M 4027M 0M 100% /media/cdrom0 /dev/hda1 40960M 36414M 4547M 89% /media/Hard Disk /dev/hda4 47956M 22185M 23335M 49% /media/disk hda1 is my Windows Vista partition, and hda4 is where most of my documents are still located; as my home directory now appears to be 'virtually' on the / partition, I don't have enough space to move everything over. Also, I can no longer move files/folders to the Trash from hda4 -- I can only delete them permanently. Is there a reason for this, and is it possible to enable sending to Trash for this partition? Sandy

Hi Sandy, I see now that 8.04 is using GVFS. Could someone explain what it is in
layman's terms?
GVFS is the new GNOME Virtual File System, a replacement for a previous component named GnomeVFS. A virtual file system lets you access your disks (file:// in a GNOME application) but also things like gphoto2:// for cameras and smb:// or ftp:// for network files. Applications use the VFS API and gain the ability to read and write files on any device supported by the VFS. One of the specific advantages of GVFS is support for FUSE (too many acronyms yet?), the "userspace file system" which lets you connect to other file systems like NTFS (Windows) and ZFS (Solaris) without needing kernel drivers. This is of particular note for ZFS, Sun's new all-singing-all-dancing storage management and file system. Licensing incompatibility between Sun's CDDL and Linux's GPL means that while ZFS is "open source", it cannot be implemented in Linux. FreeBSD does not have this restriction and ZFS is available in 7.0-RELEASE. There is also a similar component of KDE named KIO. The GNOME 2.22 release notes provide a brief introduction: http://library.gnome.org/misc/release-notes/2.22/#sect:gvfs
Also, why is my home directory now no longer on /dev/hda4 (which is where /home was located before), and instead what seems to be a virtual file system on /dev/hda3 (the / partition).
Filesystem 1M-blocks Used Available Use% Mounted on /dev/hda3 23651M 6418M 16042M 29% / /dev/hda4 47956M 22185M 23335M 49% /media/disk
What do you see on /media/disk? What makes you think that /dev/hda3 is virtual?
Also, I can no longer move files/folders to the Trash from hda4 -- I can only delete them permanently. Is there a reason for this, and is it possible to enable sending to Trash for this partition?
With the move to GVFS, GNOME now uses the freedesktop.org trash specification (layman's terms: KDE and GNOME can share a trash bin). While I don't know the answer to your question specifically, you might like to start reading at http://www.freedesktop.org/wiki/Specifications/trash-spec Craig

2008/4/30 Chakat Sandwalker <sandwalker(a)gmail.com>:
Also, I can no longer move files/folders to the Trash from hda4 -- I can only delete them permanently. Is there a reason for this, and is it possible to enable sending to Trash for this partition?
My system also has multiple partitions and partition types (and operating systems). Under 7.10 (and earlier?) permanent deletion was the only option when removing files from some partitions. IIRC, flash and floppy drives allowed moving to trash, which wasn't particularly helpful when deleting files to free up space on those drives! Michael

It would appear that /dev/hda4 is the partition that used to be called /home. I suggest you edit your /etc/fstab and add an entry like this; /dev/hda4 /home ext3 defaults 0 0 Then move the old home out of the way, create a new mountpoint and mount it. You may also need to chown your home if the userid's have changed; # mv /home /oldhome # mkdir /home # mount /home # chown -R sandy:sandy /home/sandy/ Or you could just come along to saturdayworkshop and we'll get it sorted out there..

Yeah, I was going to come along on Saturday anyway. I'd particularly like to get access to my home directory from Windows again -- since the home directory is now in a different place, the IFS driver in Windows can't see it (and the IFS control panel crashes if I try to use it, so I can't change where the drive letter points to). Sandy Bruce Kingsbury wrote:
It would appear that /dev/hda4 is the partition that used to be called /home.
I suggest you edit your /etc/fstab and add an entry like this;
/dev/hda4 /home ext3 defaults 0 0
Then move the old home out of the way, create a new mountpoint and mount it. You may also need to chown your home if the userid's have changed;
# mv /home /oldhome # mkdir /home # mount /home # chown -R sandy:sandy /home/sandy/
Or you could just come along to saturdayworkshop and we'll get it sorted out there.

On Wed, Apr 30, 2008 at 5:57 PM, Chakat Sandwalker <sandwalker(a)gmail.com> wrote:
Yeah, I was going to come along on Saturday anyway. I'd particularly like to get access to my home directory from Windows again -- since the home directory is now in a different place, the IFS driver in Windows can't see it (and the IFS control panel crashes if I try to use it, so I can't change where the drive letter points to).
How did you upgrade? Why do you think it would have moved /home? If that is the case, have you looked on Launchpad for bugs? Craig

I originally did an upgrade using the update manager (880MB!), and was surprised when it actually worked. However, I hit that odd sudo problem, fixed it, and found that I still had no access to the network administration panel -- it was completely greyed out, even the Unlock button, so I opted to just do a clean install. Originally my L: in Windows pointed to /dev/hda4/home/sandy, but that path is now /dev/hda4/media/disk/sandy, and the drive letter still references the old path. I can't change where the drive letter points to because the IFS control panel crashes. Sandy Craig Box wrote:
How did you upgrade? Why do you think it would have moved /home? If that is the case, have you looked on Launchpad for bugs?
participants (9)
-
Bruce Kingsbury
-
Chakat Sandwalker
-
Craig Box
-
Daniel Lawson
-
Glenn Ramsey
-
James Pluck
-
John McPherson
-
Michael McDonald
-
Peter Reutemann