Is there a way to specify a per-user resolv.conf
?
What I found are vague references to the possibility of having a per-user host file, but I'm not interested in that, I'm actually interested in a full resolv.conf
, because I want to set different nameservers.
If you're asking why the point is testing cjdns nameserver(s) on a multi-user environment in which I don't want to affect other users of the system.
Would it be possible to perhaps abuse the nsswitch system?
Best Answer
Local filesystem namespaces are your friend, though they do require root permissions to set up.
If you want a script which will run an arbitrary command with your updated resolv.conf, consider:
Thus, this could be used as: