I just realised nmcli commands don't ask me password for sudo access, but ends up modifying a file under /etc/NetworkManager/system-connections/ which is root-only access.
How is this allowed? What's the mechanism that makes a process change a file that the user doesn't have access to?
Details are, I've got a vpn connection, let's say my-vpn, and run for example:
nmcli c modify my-vpn +ipv4.dns 192.168.1.12
and the /etc/NetworkManager/system-connections/my-vpn file is modified to include the dns.
unix-group:sudo
group are givenlocalauthority
by default. – steeldriver Sep 07 '21 at 23:30