
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..."