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.
- 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.
- You are not able to delete entries from your Keychain (you might receive a Unix internal error when you attempt to do this).
- Creating a new user id and trying that exhibits the same problems.
- Manually attempting to repair Disk Permissions (I won’t go into that at this point) does not solve the issue.
- Resetting your NVRAM doesn’t solve the issue.
- Opening Finder and manually changing the permissions for your home directory (using the little gear at the bottom) does not fix the issue.
- 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.
Correcting problem this is surprisingly easy:
- 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.
- In Recovery Mode, launch Terminal (under the Utilities menu item).
- At the Unix prompt, type: csrutil disable and press ENTER.
- Restart your device using the Apple Menu.
- 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.
- Boot into Recovery Mode again (CMD+R during restart…)
- Launch Terminal.
- 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.]