Anyone know how to make an executable bash script not require my password every time I run it by double clicking the icon?
The VPN software I use has a habit of breaking my internet when I disconnect, which is easily solved by going to the control panel and renewing the DHCP lease.
Ain't nobody got time for that though, so I wrote a bash script to do it and made it executable using chmod.
Only problem is that it has a sudo command in it so I have to enter my password which makes it easier to renew the DHCP lease via the control panel - i.e. makes it pointless!
Any ideas? Can I make finder run it as a superuser by default?
get prompted for password once, then run your script, without sudo, via command line in that elevated session when you need to, perhaps using a suitable alias?
Disclaimer: I no longer have a Mac (or working VM) to test it on.
Anyone know how to make an executable bash script not require my password every time I run it by double clicking the icon?
The VPN software I use has a habit of breaking my internet when I disconnect, which is easily solved by going to the control panel and renewing the DHCP lease.
Ain't nobody got time for that though, so I wrote a bash script to do it and made it executable using chmod.
Only problem is that it has a sudo command in it so I have to enter my password which makes it easier to renew the DHCP lease via the control panel - i.e. makes it pointless!
Any ideas? Can I make finder run it as a superuser by default?