LUKS, dmcrypt debian lenny neuen Schlüssel hinzufügen

Mein Server hat ein Standard Lenny und ich habe bei der Partitionierung/Installation ein voll verschlüsseltes System gewählt.
Das Passwort kenne nur ich, aber nach einem Stromausfall ist meist nur meine Holde daheim, die kennt aber das Passwort nicht. Ich vertraue Ihr, keine Frage, aber mein Passwort bekommt sie nicht.. aber man kann ja bei LUKS verschiedene Passwörter einrichten.

Als erstes sucht schaut man welches Hardware Device wirklich ein LUKS device ist:
for I in /dev/[h,s]d*; do cryptsetup isLuks $I; if [ $? -eq "0" ]; then echo "$I ist LUKS"; fi; done
/dev/sda2 ist LUKS

Also /dev/sda2

Das gucken wir uns mal an:
# cryptsetup luksDump /dev/sda2
LUKS header information for /dev/sda2
Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 2056
MK bits: 256
MK digest: a2 82 c2 fa 2a a2 ff eb 72 65 23 6b a0 2b 58 16 0f 4d 7c 02
MK salt: 4e 5c be 61 94 2a c3 bd 06 dd ce 01 a2 7e 9f 1e
3c 29 0d 49 58 b0 bc f5 9d 27 b2 b6 a3 4b 5f 32
MK iterations: 10
UUID: 83c19b6b-eb63-4515-a63d-04bf33142126
Key Slot 0: ENABLED
Iterations: 213596
Salt: 22 33 44 55 66 77 88 99 aa bb cc dd ee ff ee dd
cc bb aa 99 88 77 66 55 44 33 22 11 00 11 22 33
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Dann kann man einen key dazu hinzufügen z.B. in Slot 7:
# cryptsetup luksAddKey /dev/sda2 --key-slot 7
Enter any LUKS passphrase:
key slot 0 unlocked.
Enter new passphrase for key slot:
Verify passphrase:
Command successful.

Und auch wieder löschen
# cryptsetup luksDelKey /dev/sda2 7
luksDelKey is a deprecated action name.
Please use luksKillSlot.
Enter any remaining LUKS passphrase:
key slot 7 verified.
Command successful.

(Das nächste mal also mit LuksKillSlot)

Schon hat man mehr als ein Passwort zum entschlüsseln.