A little script to re-initialize the card (erase and load)
I wrote this because from time to time (2x a Month) my PIN gets locked
out - usually because I'm drunk and can't type, but sometimes because of
a software bug (ssh is such a b*tch to me). I have never been able to
unblock the PIN with the PUK and this is where my script comes handy...
It is very straightforward and simple, yet (I hope) flexible to customize.
It prompts user for the passwords (SOPIN, SOPUK, PIN, PUK, passphrase
for private keys) and a list of certificates to store on the key.
It then creates separate auth-id for every certificate and stores the
The default profile used is "pkcs15+oberthur", without it, I couldn't
store 4 different IDs to my iKey 3000.
Comments are welcome (is using a separate auth-id for everything a good