> Hi. Hi.
> > While DNS lookups for localhost are unusual any reasonable configured > DNS should have no trouble resolving it. Especially since there are OSes > that try to resolve *everything* by default via including localhost (AIX > comes to mind). > Understand, but disagree with sudo doing DNS lookups. Will fill a bug with them. > While you mentioned misconfigured resolv.conf I believe your problem > lies somewhat deeper than this. Actually it is deeper. I did not pay that much attention to the strace I did before. https://pastebin.com/j0rw5Kgn 10.1.2.9 is the DNS of the company I work for, turned out I had not connected to the VPN yet by the time i issued the sudo command. --- connect(6, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.1.2.9")}, 16) = 0^M poll([{fd=6, events=POLLOUT}], 1, 0) = 1 ([{fd=6, revents=POLLOUT}])^M sendmmsg(6, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\372\251\1\0\0\1\0\0\0\0\0\0\tlocalhost\vlocaldoma"..., iov_len=39}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_OOB|MSG_PEEK}, msg_len=39}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\25\201\1\0\0\1\0\0\0\0\0\0\tlocalhost\vlocaldoma"..., iov_len=39}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_PEEK}, msg_len=39}], 2, MSG_NOSIGNAL) = 2^M poll([{fd=6, events=POLLIN}], 1, 5000) = 0 (Timeout)^M --- resolv.conf is not a symlink to systemd, just a plain file. I explicitly removed the symlink and created a normal file. > Specifically I'm interested with: > > grep hosts /etc/nsswitch.conf > > grep localhost /etc/hosts > > Reco > Did not touched these, are the default from stretch: root@localhost:~# grep hosts /etc/nsswitch.conf hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname root@localhost:~# grep localhost /etc/hosts 127.0.0.1 localhost 127.0.1.1 localhost ::1 localhost ip6-localhost ip6-loopback x9p

