Fix: Mac OS X Won’t Save Your WiFi Password

Quick fix for Mac OS X computers that exhibit, among other things, the repeated loss of WiFi passwords.


Since I have a tech background, I’m often asked to “look at” people’s computers when they have some sort of issue.  Usually the issue is that the device is running slowly, or exhibiting odd symptoms.  I’m not computer genius but I know my away around Mac OS’s well enough to usually find the problem and correct it.


Side story: Years and years ago I used to be a Microsoft guy, with all PC’s in the house and my dev background was all Win32, MFC, C#, .NET, etc.  But I eventually became weary of getting PC support calls from my house.  Usually it was due to tons of malware, viruses and junk that was downloaded and installed without my wife knowing it.  We’d purchase brand new PC’s and they were quick, for about a year, and then invariably would slow down.  Often a few defragging runs and some spyware removal software would do the trick.  Or because I knew my way around the registry, I would perform various hacks to optimize the PC’s performance.

Eventually I became fed up with having to be home-tech-support, so I went out and bought my wife a Mac Mini.  It was inexpensive and low profile, but nearly instantly her calls to me about tech issues all but disappeared.  Since then I have become an all Apple family, with iPads, Apple Watch, Airport Extreme, Mac Mini’s, iPhones, etc.   And though it’s not perfect, I’ve come to respect and enjoy the simplicity of this platform.    Mac OS doesn’t have a registry but it does have a Unix under-pinning, which I love.


Okay here are the symptoms you may be seeing on  your MacBook (or MacAir or MacBook Pro).  This was on Mavericks but migrating to High Sierra did not fix the issue.

  1. WiFi networks and passwords for those networks are not retained.  Each time you log in you have re-select the network and re-enter the password.
  2. You are not able to delete entries from your Keychain (you might receive a Unix internal error when you attempt to do this).
  3. Creating a new user id and trying that exhibits the same problems.
  4. Manually attempting to repair Disk Permissions (I won’t go into that at this point) does not solve the issue.
  5. Resetting your NVRAM doesn’t solve the issue.
  6. Opening Finder and manually changing the permissions for your home directory (using the little gear at the bottom) does not fix the issue.
  7. You are unable to install certain new software (virus protection software for example).  You receive an error and the software will not install or enable.

I spent literally five hours searching and trying different things until the issue was resolved.  All the way, I was worried that I’d break something because it wasn’t my personal device.

The problem ends up being with a feature called System Integrity Protection or SIP.  This is intended to allow you to safely update your Keychain while making it difficult for other programs/processes to do the same.  It’s a neat safety feature that works very well, normally.

However, this process can become confused and/or corrupt.  At that point, nothing is allowed to update your Keychain and in fact, if you check permissions on it, the Keychain file will be set to “restricted”.

The Simple Fix

Note: while the risk of losing any data or damaging your device with this technique is low, please BACKUP your system first.  Also, please note that you are using this at your own risk.  I am not responsible for any issues with your system after using this corrective technique.

(whew)

Correcting problem this is surprisingly easy:

  1. Boot into Recovery Mode.  This entails restarting Mac OS and as soon as starts to boot up, hold down (and continue to hold) CMD and the letter R.  Once you see the Apple Logo, release the keys.
  2. In Recovery Mode, launch Terminal (under the Utilities menu item).
  3. At the Unix prompt, type: csrutil disable and press ENTER.
  4. Restart your device using the Apple Menu.
  5. Now go in and see if the system remembers WiFi password.  That is, select a WiFi network, enter the password, let it connect, select another WiFi or turn WiFi OFF and then ON, and then select the original network and see if it reconnects automatically without prompting for a password.

Another way to see if this worked is, after you’ve entered your WiFi password and connected to your network, launch Keychain and search for the name of your WiFi network.  Your search should find it.  If not, then this did not fix the problem.

Once you’ve determined that the issue is fixed, you need to turn SIP back on because it’s a handy and protective feature.

  1. Boot into Recovery Mode again (CMD+R during restart…)
  2. Launch Terminal.
  3. At the Unix prompt, type: csrutil enable and press ENTER.

Once at the prompt again, restart your Mac in normal mode and you should be good!

[Note, if this does not fix the issue, please let me know by posting a comment because there are other things you can try.  This worked for me after trying all those other things.]

Good luck!

53 thoughts on “Fix: Mac OS X Won’t Save Your WiFi Password

    1. Jiminy, that is good for you. I have Macbook also. Can we have story of background for Monkey? Please give bio-graphical story. Is important when posting quick-fix to give bio about wife and PC past

      Like

      1. Well, I think my Bio says it all, if you read it! I can provide more details on the frustration with PC’s if you’re interested, in a separate article. My background is 25 years of development and technical development management.

        Like

    1. You’re welcome – I wrote this a little while back when a friend asked me to help correct this on their Mac. Took me a while but I figured it out. Glad I could help. I’ll post more on this site very soon, hopefully helpful things.

      Like

  1. Is this fix likely to work for Outlook 2011 after updating to High Sierra? I’ve tried all the fixes I can find online, mostly deleting the keychain login folder and forcing it to make a new one, but all in vain. I have to keep manually entering the passwords for each email address, which is a complete pain. And I am no longer able to send mail, as it says something about not being authenticated…going quietly mad…!

    Like

    1. I *think* so because this is really about the system being able to store your credentials. I have to restate that since I’m not actually the one making these changes I can’t be responsible if you make the changes and mess something up. But this sort of issue is related to the same thing that causes the Wifi issue.

      If you want, you’re welcome to email me directly at: willrwills@gmail.com and I can try to help.

      Like

  2. holy quick fixes batman! thanks a heap! i’m actually a web developer with years of using macs and i’ve tried so many fixes recommended by dr. google, digging around in the keychain without a net (so to speak), all to no avail. your suggestion worked perfectly; i feel like i can quit work for the day as this has been such a pain i feel like i’ve achieved something quite substantial now! thanks again will.

    Liked by 1 person

    1. Glad to help!. I paused on my writing a bit – but I need to get back to it. I’m a developer as well – mainly C# and Swift/iOS. When this happened to me, I tried to find a solution and could not, so I pieced together and kept trying things until I fixed it. And then I broke it and fixed it again to make sure.

      Have a great holiday and if you’re feeling charitable, give this site a follow!

      Bill

      Like

  3. Hi there! Unfortunately no luck with this. Here’s my specs:

    MacBook Pro (15-inch, 2018)
    Processor 2.9 GHz Intel Core i9
    Memory 32 GB 2400 MHz DDR4
    Graphics Intel UHD Graphics 630 1536 MB

    Running macOS Mojave
    version 10.14.12 (had this problem on prior version of Mojave)

    My Wi-Fi is unlisted (never had a problem on older machines and don’t have any problems with iOS devices). This unit is essentially a clone (restored backup) of its predecessor, which did not have the issue.

    Main Wi-Fi router is not Apple but there are some Apple Airports in some rooms to extend the network (and add headphone jack airplay access).

    Tried connecting strictly to the main router and still have the issue.

    Removed network from network settings and re-tried. Still having to manually enter each time.

    Any advice is appreciated!

    Thanks!

    Like

      1. Hey Will!

        Tried this awhile back and it didn’t resolve my issue. You kindly offered to help. Still willing to?

        Like

  4. Thank you very much Will! this was very helpful for me since, ate least one year I have been suffering of this matter.
    Nice we have good persons like you!

    Like

  5. YAY! I just rebooted my computer after following your “Simple Fix” and it remembered my home Wifi for the FIRST TIME since I bought this computer! I also checked the Keychain and it’s in there. Phew. So grateful. THANK YOU SO MUCH!

    Like

  6. YAY! I just rebooted my computer after following your “Simple Fix” and it remembered my home Wifi for the FIRST TIME since I bought this computer! I also checked the Keychain and it’s in there. Phew. So grateful. THANK YOU SO MUCH!

    Liked by 1 person

  7. Oh my God! Thank you, thank you, thank you soooo much! I have had my Mac for about 4 years now and it was always sooo annoying having to enter the wifi passwords at home and work, etc. Alhamdulillah (Praise to God) your solution worked. I have looked up other ways to do it and it never worked. Thank you so much! It was easy and none of my files were deleted.

    God bless you!

    Liked by 1 person

    1. Very happy to help! 🙂 It was so frustrating for me as well, that I spent hours and hours searching until I found the solution. Thank you for your wonderful comment – I hope you are safe and well during these times.

      Like

  8. It’s a big little thing to have to constantly enter the WIFI password. My work’s excessive zeal around passwords led me to being repeatedly locked out of its system. That led me to clear my home keychain, which is when this problem arose. I spent hours looking at the WIFI passwords, then the system keychain (which would not allow changes). Your fix actually worked – I thank you.

    Like

  9. Thank you so much for this fix. I’ve been trying to solve this problem for several days, tried other command line options (that didn’t work) and this did it. This computer is for my 6 year old great niece — she is entering virtual first grade and having to enter the password for the internet every time was just one more hurdle she didn’t need. Thanks!

    Liked by 1 person

Give me your thoughts!