-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
@PezzaD84
It is possible to change the Login keychain via a terminal/script command
security set-keychain-password -o oldpassword -p newpassword
or
security set-keychain-password -o oldpassword -p newpassword path-to-keychain
However I get the impression that the dreaded local items keychain cannot be manipulated at all at least by the same security command. As I am sure you are aware the Login keychain is at
~/Library/Keychains/login.keychain.db
and the local items keychain is at
~/Library/Keychains/[UUID]/keychain-2.db.*
It would be preferable to preserve this keychain but for the LAPS account it is les important than a user account so if needed just deleting the local items keychain sub-folder would be ok.
It could be Apple have changed things in new macOS versions but previously I used the LAPS solution here - https://github.com/NU-ITS/LAPSforMac
When I last used it I do not recall it causing any keychain problems. It would therefore be worth having a look at its script. Be aware its code for reading and modifying its extension attribute is out of date, as an example its xpath command needs changing on Big Sur and later. You only need to look really at its code for changing the user/keychain passwords and see if it works better.
Originally posted by @jelockwood in #6 (comment)