I renamed an Ubuntu 14.04 server (changed name in hostname) and now when I sudo I get a can not resolve host {nane} message. The command still works though. Do I need to change another file to bind the name to the loopback interface?


Sudo shouldn't care about the hostname of the machine unless it is specified in the /etc/sudoers file. But if it were wrong there you wouldnlt be able to use sudo. If you just want to get rid of the error edit your /etc/hosts and add newhostname.yourdomain newhostname then your machine will be able to resolve that hostname.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.