Posted on 11-28-2018 02:56 PM
I've been recently looking at doing some work with Keychain. I was wondering if there is a way to check when the default login Keychain was last created or updated. The problem is that user change their AD passwords while abroad and Keychain doesn't update (I know we all have this problem, just looking for some insight). What I want to do is compare the Password Last Set param in AD with the time stamp on the local login password. I looked into using the security utility, but it doesn't seem to provide the information I need. I appreciate any advise. I can easily get the timestamp from AD using:
do shell script "dscl /Active Directory/YALE/All Domains read /Users/$USER pwdLastSet | cut -c 30- | perl -pne 's/(d{11})d{7}/scalar(localtime($1-11644473600))/e'"
Looking for something like this with the local Keychain password.