Skip to main content
Question

Having problem with script to setwebproxy

  • November 30, 2012
  • 5 replies
  • 0 views

Forum|alt.badge.img+3

I am look for some help with a script I am trying to run that will turn on Airports web proxy, add the domain and port and turn on authentication and the corresponding username/password. I want to have the proxy authentication to happen blind to users

I am able to execute the script without any errors, the web proxy turns on and the fields for my domain and port all populate. However turning on authentication and the username/password blanks do not populate

#!/bin/bash 

/usr/sbin/networksetup -setwebproxy "Airport" "proxy.server.com" "123" "On" "proxyuser" "proxypass"

exit 0

Thanks in advance!
Cory

5 replies

Forum|alt.badge.img+7
  • Contributor
  • 48 replies
  • June 13, 2013

I'm having the exact same issue. If i find anything i will let you know


Forum|alt.badge.img+7
  • Contributor
  • 56 replies
  • June 13, 2013

When you run:

/usr/sbin/networksetup -listallnetworkservices

Is the network service listed as "Airport" or as something else?


Forum|alt.badge.img+7
  • Contributor
  • 51 replies
  • June 13, 2013

You might have a look at this thread, too.

https://jamfnation.jamfsoftware.com/discussion.html?id=6562

Should give some helpful hints.


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 9 replies
  • June 14, 2013

using

/usr/sbin/networksetup -setwebproxy "Airport" "proxy.server.com" "123" "On" "proxyuser" "proxypass"

I could get get the proxy and port to populate, but the user/pass was hit or miss, which was what I was aiming for.

I ended up using the SetWebProxy.sh from the Resource Kit, which accomplished setting the proxy and port, but not the user/pass

but what I was really shooting for was to make it transparent for the end user that they did not need to manually authenticate and clicking Always Allow when prompted for keychain access to the proxy. We ended up rolling with it and it all worked out, just was going for convenience for users.


Forum|alt.badge.img+24
  • Honored Contributor
  • 341 replies
  • June 14, 2013

This is only a thought as I've never played with that flag in networksetup, but what if you set it to "on" instead of "On"? Does that make any difference?

I've seen flags that are case sensitive and others that are not within the same binary before. I know it's a stretch, but worth a try.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings