I am looking for a way to do the equivalent without prompting for password. I need it to be a native way that does not require the user to change any configuration files (including sudoers). And GUI doesn't count (making AppleScript open System Preferences and click the buttons).

do shell script "networksetup -setsocksfirewallproxy wi-fi 5464 off"
do shell script "networksetup -setsocksfirewallproxystate wi-fi on"

Maybe something with keychain? Configuration profile?

Note: If they have to type in a admin one time to set something up thats ok (like giving the application access to keychain), but it must be simple enough the average user can do it.

Simplicity is the most important.

Attempted Solutions



  • 1
    What access do you have to the boxes? eg. you can push out software at build time before users get to it, so could just script this, or, users come to you with their own hardware, so you can't? – Alex Aug 26 '18 at 0:57
  • @Alex Users download program from site. I don't touch hardware. (Not Admin situation) – JBis Aug 26 '18 at 0:59

Actually found solution that seems to work...

  1. Copy the file to your applications Resources folder
cp /usr/sbin/networksetup /path/to/app/Contents/Resources
  1. Change permissions from this post
do shell script "chmod u+s /path/to/app/Contents/Resources/networksetup" with administrator privileges

The user will have to type in their password once, but after that they will not have to.

Any other solutions where you don't have to type in password would be better!

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .