in OSX

How to create new system keychain on OSX El Capitan

If an OSX update killed your system keychain, do the following:

1. Reboot

2. Boot in Rescue (Cmd + R after chime)

3. Open Terminal, enter `csrutil disable`

4. Reboot

5. In your normal OSX environment, backup following sources:

   /Library/Keychains
   /var/db/SystemKey

6. Open Terminal and enter `sudo systemkeychain -vfcC` which creates a new system keychain

7. Reboot to Rescue (Cmd + R)

8. Open Terminal, enter `csrutil enable`

9. Reboot

Oh, btw, this has nothing to do with your user’s login keychain, which resides at ~/Library/Keychains. The tilde marks the difference.