Comment 2 for bug 32906

I have experience a similar problem, by mistake I removed the hostname of my machine and it was automatically set to 'none', I re-started my computer and then I could not perform any task using sudo cause all the time I received the error: sudo: unable to lookup (none) via gethostbyname()

I had to re-start in rescue mode and add manually as root the correct hostname in the /etc/hostname and /etc/hosts files

Why does sudo need to perform a 'gethostbyname()'?