daily pastebin goal
58%
SHARE
TWEET

Password last changed date

applehelpwriter Mar 14th, 2018 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #one liner command line to get last password set times for all users on the mac
  2.  
  3. # see http://applehelpwriter.com/2018/03/14/6228
  4. echo; echo Password Last Changed:; u=$(dscl . list /Users | egrep -v '^_|daemon|nobody'); for i in $u; do printf \\n$i\\t; currentUser=$i;t=$(dscl . read /Users/"$currentUser" | grep -A1 passwordLastSetTime | grep real | awk -F'real>|</real' '{print $2}'); date -j -f %s "$t" 2> /dev/null; done
RAW Paste Data
Top