How to Fix Time Machine Error 45, 5999 or SMB Connecting Error
You can log-in to your NAS and Time Machine drive just fine. Even Time Machine from System Preferences accept the drive as Time Machine destination. But it prompts you for username and password for NAS again and again, even though the credentials are correct, and the Time Machine even mount the drive correctly. On desktop side of the business, the endless prompts for passwords have resulted in mountainous duplicate mounting points for the same drive. In other words, same drive icons all over the plaza.
If you pass the command-line argument to setup the NAS as the destination, Terminal will return either Error 45 or 5999.
Some Notes to Consider Before Proceeding
The solution is in two parts, because I wasn’t able to narrow down the actual fault behind it. I am currently using Synology NAS, and there was a good chance the new DSM, Synology’s flavor of linux, has different implementation of SMB. Likewise, Apple’s new macOS Ventura may have been shipped with flawed SMB for Time Machine utility, or the utility itself somehow can’t accept existing SMB setup.
In any case, I did not notice the problem until recently, as Time Machine doesn’t warn a user about skipping backups. From what I can gather, my Macs all stopped backups around November 22nd or 23rd of 2022. The time frame didn’t match with any significant updates from either Synology or Apple products. However, seeing as the setup had been working without issues, I can only suspect something must have changed.
I want to start by saying the transition from AFP to SMB could be the problem. As Apple is depreciating AFP, Time Machine and others have been supporting SMB for some time. However, as the transition goes, I’ve seen odd behaviors where AFP is called for either default or fallback mechanism. If you have recently disabled AFP on your NAS and in need of Time Machine immediately, turning AFP back on will be a temporary solution, though I discourage it.
The other problem I see with SMB implementation on both Synology and Apple side of the fence is password. I’m an advocate for password manager, truly the only sane way to keep lengthy random password. That being said, many websites and services can’t handle passwords that are either lengthy or truly complicated, or both. Many times the system has no problem registering the password but not taking it. My immediate response, when fell on faulty SMB implementation, was to change the password to relatively short, 20 characters, without special characters, for damage control sake.
Last, but not least, Synology issue on the list would be ‘broadcasting Time Machine Bonjour on SMB’ option. I, for one, did not know latest DSM was shipped with Time Machine related features and/or settings. Enabling the option allows any Macs on local network to find the drive while not mounted. It gives better chance for Time Machine GUI to pick up the drive.
On Apple’s side of business, now the Time Machine will prompt for new credentials. Instead of taking chances with the old settings, I had my Time Machine destination info deleted from GUI, added back again. Unfortunately, a pop-up showed the network drive may be mounted in duplicate manner, (i.e. Volumes/DriveName-1 was mounted) so I had the computer restarted. After manually prompting for the first backup with the new settings, I was able to keep the old backups with working networked Time Machine setup.
I wish I could provide more detailed explanation on what is going on, and what could be the other possible fixes are. But the documentations on ‘tmutil’ or Time Machine utility was scarce to find. In fact, when googled with the error codes, I was greeted with a simple explanation: ‘it means Time Machine could not complete backup’. I believe that’s just what an error in general means, not the specific error code. Especially the bizarre behavior of keep mounting the same drive to under different name was another rabbit hole I didn’t want to see.
As for the SMB side, this wouldn’t be my first time seeing a faulty implementation of a good, commonly-used, protocol, assuming that was the case. It was one of the reason why I immediately tried changing my password from 100 characters to meager 20. To my great surprise, there are still many websites and services without proper password practices in place. If there is a hard length limit on password, one must thoroughly test and disclose it. If the password cannot contain certain or all special characters, it needs to be checked in place.