#Tidy up
sudo killall pkcsslotdĀ 
sudo rm -rf /usr/local/var/lib/opencryptoki/*
sudo rm -rf /usr/local/var/lib/opencryptoki/.slotpidĀ 
# Create clean configuration
sudo pkcs11_startup
sudo pkcsslotd
pkcs11-tool --module=/usr/local/lib/pkcs11/PKCS11_API.so -I
Cryptoki version 2.11
Manufacturer     IBM
Library          Meta PKCS11 LIBRARY (ver 2.2)

#The default so PIN is 87654321
#Init
pkcsconf -I -c 0
Enter the SO PIN: ********
Enter a unique token label: jadtest

#Change SO PIN
pkcsconf -P -c 0
Enter the SO PIN: ********
Enter the new SO PIN: ********
Re-enter the new SO PIN: ********

#Set the user PIN
pkcsconf -u -c 0
Enter the SO PIN: ********
Enter the new user PIN: ******
Re-enter the new user PIN: ******

#Create a key pair
pkcs11-tool --module=/usr/local/lib/pkcs11/PKCS11_API.so -k --key-type rsa:1024 --id 5 --label jadtest5 -l -p qwerty
Key pair generated:
Private Key Object; RSA
  label:      jadtest5
  ID:         05
  Usage:      decrypt, sign, unwrap
Public Key Object; RSA 1024 bits
  label:      jadtest5
  ID:         05
  Usage:      encrypt, verify, wrap