sudo unable to resolve host localhost.localdomain

Edit your server hosts file (/etc/hosts). You are missing the domain. For example:

It probably has a line like:

127.0.0.1  localhost

Change it to:

127.0.0.1  localhost.localdomain  localhost