Mac El Capitan Key chain issue

I recently have to reset user password from terminal with reset command and then I started getting authentication error on Keychain.
I reset the keychain, deleted the keychan, re-pointed to same keychain, signed in to company icloud account ran verification and it does show error with -

Repair started
Checking keychain configuration for steve (user ID=501)
Home directory is /Users/steve
Checked login keychain
Checked settings for ~/Library/Keychains/login.keychain
Keychain can't be unlocked automatically. Please attempt to unlock ~/Library/Keychains/login.keychain from Keychain Access.
Unable to change password for ~/Library/Keychains/login.keychain. Please change password using Edit > Change Password for Keychain.
Checked default keychain
Checked contents of ~/Library/Keychains/login.keychain
No problems found
Repair completed

User keeps getting "accountsd wants to use the "login" keychain" when switching application.
pchettriIT DirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Justin BradshawOwnerCommented:
Your best bet is to unlock the keychain and try to change the password in the keychain access app as the repair log helpfully suggests.

Changing the user password usually causes this problem and apple hasn't made it easy to deal with when it happens.
When you change the password through the System Preferences--> Users & Groups --> Change Password button it changes both the account password and the keychain password to keep the 2 passwords in sync.

When you change the password on the command line, you only reset the user account password, not the keychain password.  If you did this because the user lost the password, then there is no way to recover the keychain password.  You must delete the keychain.  The user must start over.  If the user might remember it at a later date, move the keychains to another folder.

If you do know the password, you can use the security command line tool to unlock the keychain with the known password and set the password to the current account password.
pchettriIT DirectorAuthor Commented:
I have already tried deleting key chain password. Is there any different way of deleting it. Could you suggest the detailed steps
You should delete it on the command line and completely wipe all entries.  That's best done from the command line.

You can delete the folder contents
rm ~/Library/Keychains/{*,.??*}

Or you can move the folder and create a new one, if you want to keep it around.
mv ~/Library/Keychains ~/Old_keychains; mkdir ~/Library/Keychains

There are actually several files in there and all of them require the same password.    If you're just deleting the Login Keychain, it only affects one file in your Keychains folder.  The other files still have your old password, and you have to change them as well.

It's just simpler to remove files.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Mac OS X

From novice to tech pro — start learning today.