good to know

Luks Add Key With Masterkey

Today I realized that I forgot the password to decrypt one of my hosts encrypted using Luks. Luckily it was still running and root-access still granted. As you may know root can do anything, even reading the masterkey of your unlocked Luks-devices. By using dmsetup table /dev/mapper/supercrypt --showkeys you can get hold of the masterkey. Since you only unlock the masterkey with your password, this information can be used to modify every slot.