Conditions
I assume you are using GNU/Linux and pcsc-lite.
Preparation
We need to kill scdaemon before configuring Gnuk Token.
$ killall -9 scdaemon $ killall -9 scdaemon scdaemon: no process found
Random bits (required)
Since Gnuk doesn't have Random Number Generator, we need to put random bits.
You can do that by make random_bits:
$ make random_bits dd if=/dev/random bs=1 of=random_bits count=1024 1024+0 records in 1024+0 records out 1024 bytes (1.0 kB) copied, 143.918 s, 0.0 kB/s
As seen above, this process takes much time. Don't just wait, but do some other works on your PC, /dev/random needs entropy to finish.
Then, put it using ../tool/gnuk_put_binary.py:
$ ../tool/gnuk_put_binary.py -r random_bits random_bits: 1024 Updating random bits Token: FSIJ Gnuk (0.12-38FF6A06) 00 00 ATR: 3B DA 11 FF 81 B1 FE 55 1F 03 00 31 84 73 80 01 40 00 90 00 24
Serial Number (optional)
In the file GNUK_SERIAL_NUMBER, each line has email and 6-byte serial number.
The tool ../tool/gnuk_put_binary.py examines environment variable of EMAIL, and writes serial number to Gnuk Token.
$ ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER Writing serial number Token: FSIJ Gnuk (0.12-38FF6A06) 00 00 ATR: 3B DA 11 FF 81 B1 FE 55 1F 03 00 31 84 73 80 01 40 00 90 00 24