{"id":153,"date":"2009-07-08T09:02:24","date_gmt":"2009-07-08T08:02:24","guid":{"rendered":"http:\/\/janscholten.de\/blog\/?p=153"},"modified":"2009-07-08T09:03:53","modified_gmt":"2009-07-08T08:03:53","slug":"luks-dmcrypt-debian-lenny-neuen-schlussel-hinzufugen","status":"publish","type":"post","link":"https:\/\/janscholten.de\/blog\/2009\/07\/luks-dmcrypt-debian-lenny-neuen-schlussel-hinzufugen\/","title":{"rendered":"LUKS, dmcrypt debian lenny neuen Schl\u00fcssel hinzuf\u00fcgen"},"content":{"rendered":"<p>Mein Server hat ein Standard Lenny und ich habe bei der Partitionierung\/Installation ein voll verschl\u00fcsseltes System gew\u00e4hlt.<br \/>\nDas 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\u00f6rter einrichten.<\/p>\n<p>Als erstes sucht schaut man welches Hardware Device wirklich ein LUKS device ist:<br \/>\n<code>for I in \/dev\/[h,s]d*; do cryptsetup isLuks $I; if [ $? -eq \"0\" ]; then echo \"$I ist LUKS\"; fi; done<br \/>\n\/dev\/sda2 ist LUKS<br \/>\n<\/code><br \/>\nAlso \/dev\/sda2<\/p>\n<p>Das gucken wir uns mal an:<br \/>\n<code># cryptsetup luksDump \/dev\/sda2<br \/>\nLUKS header information for \/dev\/sda2<br \/>\nVersion:        1<br \/>\nCipher name:    aes<br \/>\nCipher mode:    cbc-essiv:sha256<br \/>\nHash spec:      sha1<br \/>\nPayload offset: 2056<br \/>\nMK bits:        256<br \/>\nMK digest:      a2 82 c2 fa 2a a2 ff eb 72 65 23 6b a0 2b 58 16 0f 4d 7c 02<br \/>\nMK salt:        4e 5c be 61 94 2a c3 bd 06 dd ce 01 a2 7e 9f 1e<br \/>\n                3c 29 0d 49 58 b0 bc f5 9d 27 b2 b6 a3 4b 5f 32<br \/>\nMK iterations:  10<br \/>\nUUID:           83c19b6b-eb63-4515-a63d-04bf33142126<br \/>\nKey Slot 0: ENABLED<br \/>\n        Iterations:             213596<br \/>\n        Salt:                  22 33 44 55 66 77 88 99 aa bb cc dd ee ff ee dd<br \/>\n                                cc bb aa 99 88 77 66 55 44 33 22 11 00 11 22 33<br \/>\n        Key material offset:    8<br \/>\n        AF stripes:             4000<br \/>\nKey Slot 1: DISABLED<br \/>\nKey Slot 2: DISABLED<br \/>\nKey Slot 3: DISABLED<br \/>\nKey Slot 4: DISABLED<br \/>\nKey Slot 5: DISABLED<br \/>\nKey Slot 6: DISABLED<br \/>\nKey Slot 7: DISABLED<br \/>\n<\/code><br \/>\nDann kann man einen key dazu hinzuf\u00fcgen z.B. in Slot 7:<br \/>\n<code># cryptsetup luksAddKey \/dev\/sda2 --key-slot 7<br \/>\nEnter any LUKS passphrase:<br \/>\nkey slot 0 unlocked.<br \/>\nEnter new passphrase for key slot:<br \/>\nVerify passphrase:<br \/>\nCommand successful.<br \/>\n<\/code><\/p>\n<p>Und auch wieder l\u00f6schen<br \/>\n<code># cryptsetup luksDelKey \/dev\/sda2 7<br \/>\nluksDelKey is a deprecated action name.<br \/>\nPlease use luksKillSlot.<br \/>\nEnter any remaining LUKS passphrase:<br \/>\nkey slot 7 verified.<br \/>\nCommand successful.<br \/>\n<\/code><\/p>\n<p>(Das n\u00e4chste mal also mit LuksKillSlot)<\/p>\n<p>Schon hat man mehr als ein Passwort zum entschl\u00fcsseln. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mein Server hat ein Standard Lenny und ich habe bei der Partitionierung\/Installation ein voll verschl\u00fcsseltes System gew\u00e4hlt. 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 &hellip; <a href=\"https:\/\/janscholten.de\/blog\/2009\/07\/luks-dmcrypt-debian-lenny-neuen-schlussel-hinzufugen\/\" class=\"more-link\"><span class=\"screen-reader-text\">LUKS, dmcrypt debian lenny neuen Schl\u00fcssel hinzuf\u00fcgen<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,9,14],"tags":[],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-erfahrungen","category-erleuchtung","category-server"],"_links":{"self":[{"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/comments?post=153"}],"version-history":[{"count":4,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/posts\/153\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/media?parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/categories?post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/janscholten.de\/blog\/wp-json\/wp\/v2\/tags?post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}