Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I automatically login to captive portals on OS X?

A captive portal is used by (often not password-protected) wireless networks that present a web page as soon as you connect to them, requiring you to login.

I have to login to different wireless networks like this very frequently, and none of the captive portals seem to remember my login/password information. Is there a way to automate the login process somehow, or at least store the login/password pairs in the Keychain?

Update: There’s an iOS app called AutoWifi that basically handles this. If it’s possible to do this on iOS with all its restrictions, surely it must be possible to do something like it on OS X, right?

Related fun fact: This is how Apple tests for captive portals on OS X and iOS:

OS X and iOS make a request to every time you connect to a WiFi network.

As of Yosemite the URL is now:

This URL returns the following HTML:

share|improve this question
Take a look at /Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist. Manipulating the preferences here can easily compound serious security risks on top of the many Apple has decidedly implemented on their own. I'm not sure which browser you use to connect via these captive portals, but you can also try setting up network locations for them, or creating a simple macro depending on what you want to auto-fill. – l'L'l Apr 5 '12 at 17:46
That’s the thing — whenever OS X detects a captive portal, it opens a WebView popup window (not a real browser UI) with the login page. – Mathias Bynens Apr 6 '12 at 5:53
If you have a chance post the source code of the popup. – l'L'l Apr 6 '12 at 6:30
@ioi The HTML source of the page depends on the network. Once you get the popup, it’s possible to browse to the same page by just opening any browser and trying to load a URL. – Mathias Bynens Apr 6 '12 at 6:52
None of the answers answers the question! – Tyilo Jun 22 '13 at 11:28
up vote 20 down vote accepted

You can rename

/System/Library/CoreServices/Captive Network


/System/Library/CoreServices/No More Captive Network

and you're all set. Password entering now goes via your browser of choice and can be stored using 1password or other plugins. Note that if you were already logged in while doing the renaming, it may take some time for your session to expire...

share|improve this answer
Looking forward to testing this out :) No downsides? – Mathias Bynens Dec 11 '12 at 21:51
Great post, it helped me a lot. Very creative naming :) no more captive network assistant. – Buscar웃 May 12 '14 at 16:51
While this may be simple(st?) solution, I would think cwd's answer is the proper way to do it even though it's admin-ish. There are certain things on Mac that Apple kind of forces us to be admin-ish on, when we want to "think different" from Apple. – David Jul 7 '15 at 19:14

Just found this Disable Captive Network Support in OS X

Which mentions "To disable it, set this preference:"

sudo defaults write /Library/Preferences/SystemConfiguration/ Active -boolean false

In case, you would ever want to remove this setting, you can do:

sudo defaults delete /Library/Preferences/SystemConfiguration/ Active

Then, as @Leon mentions, use the regular web browser to login. Or if you are on a network where that somehow does not work then you can still try and open the app manually ( located at /System/Library/CoreServices/Captive Network )

share|improve this answer

Tyilo's NetworkAutoLogin project on github is an os.x daemon that "Automagically logs into to Captive Portal Networks" with user-supplied credentials.

It uses PhantomJS & CasperJS to post the necessary info to the fields on the captive portal login page. Could be the secret login "password", a username-password pair, or just activating a EULA checkbox and the "connect" button.

I can't remember exactly how it is triggered, but it registers a .plist with launchctl.

You put configuration options in a json file, specifying the name of the fieldset (optional) on the captive portal page and the necessary fieldname + content pairs (required). Here's an example of the config file stored in ~/.networkautologin.js

{ // Example with all possible options
    match: {
        SSID: ['Example WiFi 1', 'Example WiFi 2'],
        BSSID: '01:23:45:67:89:AB',
        URL: ''
    form_selector: 'form#login_form',
    fields: {
        'username': 'test',
        'password': '123123'
share|improve this answer
not crazy that it requires yet another daemon to be running in the background – cwd Aug 3 '14 at 13:47
I have compiled it but have been unable to observe the daemon trigger when presented with a preset captive network login page. – Mac Cowell Aug 12 '14 at 22:26
Likewise (even updated it to the new settings in yosemite+) – Jeef Jan 8 at 16:06

Doesn't deleting (or renaming) /Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist stop the auto-probing?

It could at least stop the opening of the WebView popup.

Otherwise replace all URLs in that Settings.plist with a local hosted copy of the success.html file and host the success.html file on your localhost webserver.

share|improve this answer

A captive portal is not like a password. It's more like a sign in sheet. Every time the network you're connected to hands out an IP address through DHCP, it gives you the captive portal to sign into/agree to and then it allows you to connect. From what I understand, this is a cross platform restriction that cannot be altered. It may be something that the network administrators can change, but even that may depend on the type of equipment being used.

share|improve this answer
You’re absolutely right that it’s more like a sign-in sheet than a password, but I’m surprised there doesn’t seem to be an easy way to autofill this sheet :) On iOS, there are apps that can take care of this. Isn’t there anything similar for OS X? – Mathias Bynens Mar 23 '12 at 12:33
What apps for iOS can do this? Wouldn't you then have to use that app for web browsing, etc.? – Matt Love Mar 23 '12 at 12:36
The AutoWiFi app handles this automatically; all you have to do is click “Connect” once and you’re logged in. – Mathias Bynens Mar 23 '12 at 12:40

I seeing captive portal requests on my home network every 5 min. But I've changed in file /Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist

string: to (I meant ProbeURL section). apple changed probe URL for new OS, I do not know why, but new URL response is 200 (OK) and should works (I've faced with same problem on my mbp 2011 Mavericks).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.