While trying to reset my SO’s password, I was getting this error. This was after trying to log in on the main boot and rebooting into password recovery mode. I tried several wifi networks and tethering to my phone to no avail. I then rebooted and went into a guest mode which reboots the OS into a Safari-only state and wasn’t able to connect to any sites. This was a hint.
Next, I Reset NVRAM and then rebooted with Command + R. Don’t select any of the recovery options and instead select Network Tools (or something like that) under Utilities. I rejoined my wifi network and was able to successfully ping apple servers (apple.com).
Then, I went back to Utilities and opened the terminal. I had a hunch the date on this machine was off as it had been without power in a closet for a while. Using the
date command I was able to confirm this as it told me it was April. To fix this, type
ntpdate -u time.apple.com and hit enter. Now you have accurate time.
Finally, in terminal you type
resetpassword and hit enter. This will bring up the Apple reset password dialog box. Select the first option, log in with your Apple ID, and it should now work with any errors.
Hopefully, this saves you a few minutes and some heartburn. Donations to my coffee fund are appreciated!