I am on Linux Mint 20 with Cinnamon 4.6.7. I would like a non admin user
reg
to be able to make /etc/resolv.conf
mutable without using sudo. So I made this script at /home/reg/make-resolv-conf-mutable.sh
:
#!/bin/bash
sudo chattr -i /etc/resolv.conf
I made it executable and am trying to remove sudo password requirement with sudo visudo
, but it still requires the password even after I have added these lines at bottom of /etc/sudoers
and new file /etc/sudoers.d/resolv-conf-rules
reg ALL=NOPASSWD: /home/reg/make-resolv-conf-mutable.sh
reg ALL=(ALL:ALL) NOPASSWD: /home/reg/make-resolv-conf-mutable.sh
I ran sudo visudo -c
and all the files said "parsed OK" including /etc/sudoers
and /etc/sudoers.d/resolv-conf-rules
.
Asked by mmmm
(101 rep)
May 18, 2025, 08:25 PM
Last activity: May 19, 2025, 05:17 AM
Last activity: May 19, 2025, 05:17 AM