On trusty, the hostname was not in /etc/hosts and it was working fine. The real issue here is that sudo looks into DNS before hostname.
In /etc/nsswitch.conf, we had on trusty: hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns We now have: hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1561250 Title: Xenial vagrant image is missing its hostname in /etc/hosts To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-images/+bug/1561250/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs