On 06/08/2023 00:26, Greg Wooledge wrote:
I'm also forced to relegate the chattr solution to the end of the page,
and couch it in caveats, because some people think that it's wrong.
They can't say WHY it's wrong, of course. Maybe because it's too simple
and effective. I dunno.
How about the fact that it just solves the symptom but not the real problem?
/etc/resolv.conf does not change by itself, some tool must be making the
(possibly undesired) changes, so in most cases, I'd say it's better to
configure that tool to stop changing resolv.conf, or to add the
nameservers you want instead of whatever the tool auto discovers. Or
perhaps you don't even need that tool (in a server with static IP, for
example).
I'm not saying that chattr +i should never be used, but it should be the
last resort, and the user should know what they're doing and possible
consequences.
--
The idle man does not know what it is to enjoy rest.
Eduardo M KALINOWSKI
edua...@kalinowski.com.br