When I tried to connect from macOS to a QNAP’s Samba share for the first time in a while, for some reason I was denied and could not log in even though I was entering the correct password.
For reference, the macOS here is the latest Sonoma environment.
Investigation
- Logging in from Windows works fine
- Logging in over afp works fine
- Logging in from older macOS (High Sierra or Mojave) works fine too
How to fix it
Either method is fine as long as it solves the problem
- Clear the DNS information and reboot
$ sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
$ sudo reboot- Append @ to the user name
Add @ to the login name you enter when connecting over smb
For example, if the login name is user, make it user@
Summary
I suspect the cause has something to do with the cache, but why adding @ to the user name makes it possible to log in is unclear.
There was also information saying that capitalizing the first letter of the user name lets you log in.
If it is a bug, I hope for an early bug fix.