I want to create a bash script to enable all users to connect to wireless networks. Following the instructions on this page, I can set that and it works. However, I want to be able to do this more quickly by running a script.
I considered using sed
like this
sudo sed -i "s/auth_admin_keep/yes/g" /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
but in this file, there are two instances of auth_admin_keep
and I only want to replace the first one. I don't want the script to replace the second one even if I accidentally run the script twice.