Is it possible to disable host name queries in sudo? I do not have anything specific to particular host names in sudoers, so I would prefer to avoid network requests from a tool intended for running commands with escalated privileges.

I admit, system configuration was inconsistent when I noticed DNS queries. After upgrading a VM, that I am using for various experiments, I decided to rename it to have "trixie" in its hostname. I put the new name (short one, not FQDN) into /etc/hostname. The result was delay and a warning on failed attempt to resolve hostname before sudo password prompt. I figured out that I forgot to update 127.0.1.1 entry in /etc/hosts (libnss-myhostname is not installed).

I wonder if it is possible to make sudo purely local tool by adjusting its configuration. sudoers(5) says that DNS queries may be performed, but it is necessary to enable fqdn option. I have not noticed a way to suppress hostname-dependent logic.

Reply via email to