cloud-images should contain libnss-myhostname
Bug #1039213 reported by
Lloyd Dewolf
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Wishlist
|
Unassigned |
Bug Description
Upon running 'sudo -i' receive error:
sudo: unable to resolve host myhostname
Warning message appears to be only symptom, ie sudo to root is successful.
ENV: http://
Also confirmed issue still exists in http://
POSSIBLE SOLUTION
Looks like either need to more generally make 'sudo' use 'localhost' as hostname, or add inserting an entry in '/etc/hosts' for the hostname.
description: | updated |
To post a comment you must log in.
Hi,
could you give some information about the environment or cloud that you're running this in?
Something told cloud-init that your hostname was 'myhostname', and cloud-init set the system's hostname to that value. 'sudo' is merely complaining that it cannot resolve 'myhostname'.
This is configurable, see the documentation in doc/examples/ cloud-config. txt [1]. The default behavior assumes that your "datasource" (which gave cloud-init the value of 'myhostname') will also provide for resolving that value (and thus you would not see the error).
-- bazaar. launchpad. net/~cloud- init-dev/ cloud-init/ trunk/view/ head:/doc/ examples/ cloud-config. txt
[1] http://