We were trying to install our software on an Ubuntu machine. To do so, we needed root privileges. Basically, all we needed to do was run a runnable jar like: sudo java -jar runnableJar.jar.
All such commands would return: Unable to resolve host xxxxx.  
The /etc/hosts file had the incorrect hostname listed against the loopback interface which was causing this error. All commands which did not require sudo ran well.  
I have been reading up on the loopback interface and my understanding is that it sets up localhost and is a virtual network interface. However, why does sudo need it at all?   
