Luks
Page content
After some googling i have worked out how to add keys to a luks,
First we need to generate a key
dd if=/dev/urandom of=keyfile bs=1M count=10We can then add it to luks
cryptsetup luksAddKey /dev/device keyfileOnce this is done we can then unlock the device with a key
cryptsetup luksOpen /dev/sdb1 external -d keyfileexternalA device mapper will be added to
/dev/mapper/externalWe can then lock the device again with a
cryptsetup luksClose externalAll i have to do now is get python to run the correct command in sequence and ask for sudo access and then when you add the device it can decrypt it and start the backup process.