[H-GEN] stupid needs help - sudo and hostname
Troy Piggins
troy at piggo.com
Tue Jun 10 19:12:56 EDT 2008
* Murray McAllister wrote :
> On Tue, Jun 10, 2008 at 9:05 PM, Troy Piggins <troy at piggo.com> wrote:
>>
>> 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...
Sure does. I'll give that a go. Thanks.
--
Troy Piggins | http://piggo.com/~troy
RLU#415538 ,-O (o- O
O ) //\ O
`-O V_/_ OOO
More information about the General
mailing list