Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dangtran09

macrumors newbie
Original poster
Nov 6, 2013
6
0
Hello All -




I'm trying to update my wireless SSID pwd using the following commands, however it's prompting for the administrator username and pwd to make changes to the system keychain. I want to make it seamless so the user will not have to enter anything.



Is there a way to pass the admin's creds and select Allow to make this update change using some kind of commands (applescript, bash, etc)?



Screen+Shot+2016-06-03+at+3.16.16+PM.png




Thanks very much.







Here's my script:



sudo networksetup -setairportpower en0 off

sudo networksetup -removepreferredwirelessnetwork en0 Network_Name

sudo networksetup -setairportpower en0 on

sudo networksetup -setairportnetwork en0 Network_Name NetworkPWD



Network_Name = name of my SSID

NetworkPWD = pwd of the SSID
 

dangtran09

macrumors newbie
Original poster
Nov 6, 2013
6
0
Another option I can do this is:



goto keychain access

find the item

goto the access control

change to 'Allow all applications to access this item', then it will not prompt.



How can i make this changes via command line?
 

dangtran09

macrumors newbie
Original poster
Nov 6, 2013
6
0
Ok, please disregard the passing of admin creds to the pop-up prompt.

Now I want to make changes to a key on the keychain access control via command line.

goto keychain access

find the key

goto the access control

change to 'Allow all applications to access this item'

how can i do this via command line please?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.