![]() If you change the hostname from within the `network-admin` tool, you have no issues with `sudo` The kernel itself and/or "the Environment" "/etc/hostname" which, in turn, sets the precedent for 3. The behavior stems from the fact that the hostname is preset in 3 locations:ġ. I can confirm similar behavior on Hardy Alpha6 to what's shown above, _but_ I say that there is no bug here. Or, asked the other way round, can you please check if it is fixed for you as well on current Hardy? $ sudo grep -v '^#' /etc/sudoers | grep -v '^$' I sanyone actually able to reproduce this? Can you please post a recipe here?įor the record, I'm using the default sudoers: However, some of the recent duplicates (like bug 197494) seem to indicate that it is still a problem in hardy. Now, when I reset the hostname withĮverything works again on both dapper and hardy. it still warns me, but doesn't fail any more. Sudo: unable to lookup foobar via gethostbyname() I opened two terminal windows, and did "sudo -i" in one of them to get a root shell (#), the other is a normal user shell ($) sudo should still complain, but run the ls command. upgrade sudo to the hardy-proposed version and attempt the same. ![]() Hardy final will fail with "unable to resolve host foo" and not run the ls. open another terminal, and try "sudo ls". open a terminal and do "sudo -i" to get a root shell do "hostname foo" fails) on a system where /usr/sbin/sendmail does NOT exist (standard Ubuntu installation) Otherwise, just mark it as invalid and forget it. If you consider that this is relevant and worth discussing, we can add Adam Williamson to the conversation. Originally from 2006/02/ 24/how- to-break- ubuntu- in-thirty- seconds/, Not too smart! Surely sudo shouldn’t ABSOLUTELY NEED to look up the host it’s running on? The only way out of this that I can see is single-user mode or the recovery console. Only, as you can see, this utterly breaks Ubuntu…all I need to do to fix the sudo problem is edit /etc/hosts so 127.0.0.1 is ‘ubuntu510′ (the name of the VM) rather than ‘zen’ (the name of the real machine), but I can’t do it, because sudo doesn’t work… So now when I set up a new VMware machine I just copy the /etc/hosts from the real machine over to the VM then edit a couple of lines to match the VM, instead of re-editing it all from scratch. ![]() I have a bunch of entries in /etc/hosts because of having four local systems plus a bunch of VMware machines etc. …yeah, sudo, it’s all very clever until someone loses an eye! Sudo: unable to lookup ubuntu510 via gethostbyname() But The actual fix that worked for me is as follows:Įcho “nameserver 8.8.8.8” | sudo tee /etc/resolv.On behalf of Adam Williamson sudo scp 192.168. and further to my frustration it did not work. And I even tried adding hostname of ubuntu server and its ip address directly in my /etc/hosts file. ![]() This was a bit scary for me as it was for the first time I was facing something like this. Something wicked happened resolving ‘:http’ (-5 – No address associated with hostname)Įrr precise-cm5/contrib Translation-en_IN Something wicked happened resolving ‘:http’ (-5 – No address associated with hostname). When I tried to run sudo apt-get update, I came across something like this.Įrr precise-cm5.5.1/contrib amd64 PackagesĬouldn’t resolve host ‘’
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |