Just curious how the rest of you are dealing with this "seemingly" simple task: rolling password changes for security compliance.
OSX was engineered quite well for end users to change their passwords via the GUI. OSX was not engineered so well for sysadmins needing to change passwords via the command line across many hundreds or thousands of Macs. For example, running the dscl command below changes the password of the account in question:
dscl . -passwd /Users/YourLocalUser YourNewPassword
However, upon logging out and logging in, you're presented with a well-known, nifty pop-up window which tells you that you've bugged the login.keychain. At that point, you'll need the OLD account password to unlock the keychain, then head into keychain manager and manually reset the keychain to the NEW password you've just rolled. Meh.
"Wait a minute, you say: just use Casper v9's system to change local account passwords!". Unfortunately, the same problem occurs.
"You should just use the security command!" say all the UNIX geeks. And they'd be right to suggest that. Partially. Adding the following lines of code should also change the password of the login.keychain to match the new user password.
dscl . -passwd /Users/YourLocalUser YourNewPassword
security create-keychain -p YourNewPassword /Users/YourLocalUser/Library/Keychains/login.keychain
security create-unlock -p YourNewPassword /Users/YourLocalUser/Library/Keychains/login.keychain
chown YourLocalUser:staff /Users/YourLocalUser/Library/Keychains/login.keychain
But that doesn't work, either. Because then you get stuck with "local item" pop-up errors.
And, sure, sure, you can take Apple's suggestion of deleting these files and rebooting link here, but at this point, a super-simple task is becoming unruly. Which is why I'm writing:
What elegant solutions are you folks using to change passwords that don't annoy users with any pop-up messages. In our case:
1) we can't have any user interaction or interruption
2) we aren't changing the accounts form local to managed via AD or OD
Open to what you've all been solutioning on this. Long time peave of mine.
Cheers,