RESOLVCONF-ADMIN(1)
β¨ RESOLVCONF-ADMIN(1) β¨
okay bestie, so this is the resolvconf-admin manual page and honestly it's a whole mood β it's a little setuid program for setting up DNS resolution π
πΈ NAME πΈ
resolvconf-admin β a setuid program for setting up DNS resolution
π SYNOPSIS π
resolvconf-admin add NETIF [-s SEARCH] [-d DOMAIN] NAMESERVER [...]
resolvconf-admin del NETIF
π¦ DESCRIPTION π¦
So here's the tea: this is a setuid program, and what it does is let specific non-privileged users invoke /sbin/resolvconf (if it's actually present, that is) with a constrained argument so they can add or remove DNS resolvers. And if /sbin/resolvconf is not executable? No worries bestie, it can just replace /etc/resolv.conf instead. iconic behavior honestly.
Where is this useful, you ask? Think running a DHCP client as a non-privileged user. that's the vibe. π«
When your non-privileged user wants to set up the DNS resolvers based on info it learned from interface NETIF, it should invoke:
resolvconf-admin add NETIF [-s SEARCH] [-d DOMAIN] NAMESERVER [...]
Quick heads up: the DNS search path and the domain name are optional. but at least one nameserver is required, no exceptions. π
And when that same non-privileged user wants to tear down the DNS resolver info it had previously set for interface NETIF, it should invoke:
resolvconf-admin del NETIF
β οΈ WARNING β οΈ
okay listen. a better (non-suid) approach for setting up DNS in a non-privileged way is to make an authenticated IPC call to some running daemon that already manages the local DNS resolution configuration β like, say, systemd-resolved(8), iykyk. But some systems just don't run a daemon like that, so this setuid approach is offered instead, for those limited systems only. that's the whole point. π
Do NOT install this setuid program on systems that already run such a daemon, because every single setuid program increases the attack surface of the operating system. it's giving risk. π
DO NOT INSTALL THIS TOOL IF YOU HAVE BETTER OPTIONS AVAILABLE TO YOU! like, genuinely. periodt. π
π₯ INTERLEAVED OPERATION WITHOUT RESOLVCONF(8) π₯
On a system where resolvconf(8) is not installed, the behavior is not very sophisticated, ngl. On these systems:
- The first time
resolvconf-admin addis invoked, the old/etc/resolv.confis backed up to/etc/resolv.conf.bak.resolvconf-admin. - The first time
resolvconf-admin delis invoked, the backed up file is restored.
Now, if multiple daemons (or even a single daemon monitoring multiple sources of DNS resolver information) invokes resolvconf-admin in an interleaved fashion (e.g. two adds before a del), this will almost certainly not be the behavior that you want. π If your system is likely to have this kind of interleaved operation, it should also have resolvconf(8) installed. that's the fix, bestie. π«Ά
π SEE ALSO π
π AUTHORS π
Daniel Kahn Gillmor <dkg@fifthhorseman.net>. a legend, fr fr. π
and that's the whole page, bestie β this one came from the 2017 September era of the resolvconf-admin source, so shoutout to the past for this absolute classic. slay, stay safe, and please don't install setuid stuff you don't need πβ¨π
π¦ where this page comes from
- ubuntu jammy: resolvconf-admin 0.3-1 Β· MIT
- ubuntu noble: resolvconf-admin 0.3-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms