Password error at Mac OS
If you use multiple keyboard layouts on your Mac - or if you ever did - it's possible that the layout you think you're using at login or while logged in is not what you think it is. Try turning on Accessibility and using an onscreen keyboard at login. See if the letters for your password are what you think they are.

I live in France/Switzerland, so a common occurrence is people not aware that their keyboard layout is US, UK, French (France) or French (Swiss). So inevitably, there are lots of "y" and "z" inversions. Sometimes "a"/"q" and "z"/"w" as well.

Additionally, if there are any other Admin users on the system, use one of them to unlock the Users &amp; Groups System Preference.

The last option is to reset the password using System Recovery.