[H-GEN] stupid needs help - sudo and hostname

Murray McAllister murray.mcallister at gmail.com
Tue Jun 10 18:30:48 EDT 2008


On Tue, Jun 10, 2008 at 9:05 PM, Troy Piggins <troy at piggo.com> wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and     ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
> Just re-installed a linux box today.  Hostname "netserv".  All
> went fine - Ubuntu 8.04 distro.  Copying over config files from
> previous installation to "make it easier", I renamed /etc/hosts
> to /etc/hosts.INSTALL so I could copy the previous installation's
> hosts file into /etc.
>
> Doing all this as a user, I had been using sudo to do these type
> of operations.  But when I tried to copy /mnt/usbdrive/etc/hosts
> (the previous install's hosts file) to /etc, get a sudo error
> about "netserv hostname not known".  So now I can't sudo
> anything, and can't get /any/ hosts file to work.
>
> Didn't realise sudo was tied to the hostname.

I'm very tired and not sure I follow what you're saying, but if you:

1. Boot into safe mode (I think ubuntu adds a grub menu for this,
otherwise before booting, add "single" to the kernel boot options...)
2. Open /etc/hosts
3: Add something like the following:

127.0.0.1       localhost.localdomain   localhost       netserv

Hope that helps...




More information about the General mailing list