I was asked by a friend to assist him with an issue… they were migrating between directories and needed to get rid of cached credentials. This is what I came up with… it worked… but I am no Apple guru fair warning – it might not be the best solution. I did a little Google searching based on my knowledge of passwords being stored in a shadow file on Linux.
dscl . read /Users/ | grep GeneratedUID
dscl . read /Users/cprofitt | grep GeneratedUIDGeneratedUID: E31B7D72-904B-4152-A953-0B2106935798
sh-3.2# cd /var/db/shadow/hashsh-3.2# lsE31B7D72-904B-4152-A953-0B2106935798F1FFEEEE-DDDD-CCCC-BBBB-AAAA00000000E31B7D72-904B-4152-A953-0B2106935798.stateF1FFEEEE-DDDD-CCCC-BBBB-AAAA00000000.state
rm <hash key>*
It would appear that my knowledge of Linux paid some dividends.