You must initialize a slot using p11tool2. The slot may get a custom label by specifying the command line parameter "label=". A default label will be assigned when omitting the "label=" parameter.
First, use p11tool2 to create the SO or Security Officer. Then initialize the slot that you want to use and the slot user as shown below.
# p11tool2 slot=<slot_no.> Label=<token_label> Login=ADMIN,<ADMIN.key> InitToken=ask
# p11tool2 slot=<slot_no.> LoginSO=ask SetPin=ask,ask
# p11tool2 slot=<slot_no.> LoginSO=ask InitPin=ask
# p11tool2 slot=<slot_no.> LoginUser=ask SetPin=ask,ask
For more information regarding the commands and command parameters please check the Utimaco [p11tool2] documentation.
When integrating a physical HSM, you must use the default administrator key file ADMIN.key as shown in the console commands above, or the currently active administrator key file. When integrating the HSM simulator, you must use the default simulator key file ADMIN_SIM.key as shown in the console output below.
Mind the output of p11tool2. It will instruct you to enter the current or new PIN as needed.