How do you change the password of login.keychain programmatically?

Hello,


I'm interested in changing the login.keychain for a user through Terminal or even through Security APIs like SecKeychainChangePassword. Whenever I change it though it doesn't change the Local Items Keychain which is "supposed" to be synced to the login.keychain. I'll get a prompt then when I try to unlock the login.keychain like so: http://imgur.com/a/BhqYhso I think that the Local Items Keychain isn't changed properly when using the API or Terminal command. This isn't an issue when changing the password through the GUI.

Any feedback is greatly appreciated, thanks!

How do you change the password of login.keychain programmatically?
 
 
Q