Can't reset admin password
I was trying to install some software on my iMac when I was asked for my admin password. It had been a while and apparently the password I had in mind was wrong. Luckily I have enabled the option to change my password with Apple ID, so I logged out, tried to log in with the (wrong) password and after three times was given the option to log in with my Apple ID to change the admin password. The Apple ID was accepted and I entered a new password. But when the iMac tries to log in with that new password 0.1 seconds later, it doesn't accept it. I'm at a loss what the problem is.
Any idea what it could be? I'd prefer not to go in recovery mode as I can currently still access my iMac (don't have the password required to log in). Thanks.
iMac 27", macOS 10.14