Check out the answers given to this Ask Different Q&A,
Can't unlock preferences - no password dialog.
The top rated answer says to issue a command in the Terminal (found in /Applications/Utilities) as an administrator.
If you have a separate administrator account, enter this into the Terminal
[Change
admin to the name of your administrator account]
su admin [ENTER KEY]
password: [This is the prompt for your admin password, whatever you type in isn’t echoed to the screen, hit the enter key when you’re done]
sudo pkill -HUP securityd [ENTER KEY]
If you DON’T HAVE a separate administrator account, enter this into the Terminal
sudo pkill -HUP securityd [ENTER KEY]
password: [This is the prompt for your admin password, whatever you type in isn’t echoed to the screen, hit the enter key when you’re done]
If you’re unsure if you have a separate administrator account, that’s easily checked in System Preferences ▸ Users & Groups.
It’s good practice to have a separate day-to-day standard and administrator accounts, it’s a little bit more bother, but it prevents you or anyone else from making unchallenged system wide changes.
(System Preferences ▸ Users & Groups. Note how my regular account, ‘Christopher’, is a Standard account, and my ‘Admin’ account is the admin for this computer.)