Delete all login.keychain files

1

Does anyone know a way to script the deletion all login.keychain files from all user directories on Mac OS X? This is a lab environment bound to AD, and when a user changes their password, without correcting their keychain upon first login, it gets messy. Mass deletion once a week (or logoff hook) seems easier than training students.

Eric

Posted 2014-02-19T15:36:57.380

Reputation: 13

Answers

1

cron job with maybe rm -rf /Users/*/Library/Keychains but logoff hook might work better.

levy

Posted 2014-02-19T15:36:57.380

Reputation: 146

Can you be a bit more specific? What would you do with a cron job, etc... – Jon – 2014-03-08T08:21:01.010

1The command I posted would remove the local keychain folder of all users. Is that what you wanted to do? All unix like systems have a cron serivce that let's you schedule commands. You can setup cron to run a command once a week or anytime really. You can view the currents logged in users cron job by doing running "crontab -l" in terminal and use sudo to view the root users cron jobs. But if you have a lot of computers this will be a pain to setup by hand. – levy – 2014-03-08T19:12:22.103