2011年12月25日 星期日

變更ubuntu加密系統之密碼

[encrypted device]: for example /dev/sda#
step. 1. 看有那些解密碼 (似乎可以多重密碼解鎖,未測試。)

sudo cryptsetup luksDump [encrypted device]

step. 2. 加新的密碼,會先要求輸入舊的密碼,才能新增新密碼。完成後若重複step1,可看見二組解密碼。

sudo cryptsetup luksAddKey [encrypted device]


step. 3. 移除舊的密碼,。密碼依加入順序以0-index排序。一般情況而言,舊密碼排序號為 0, 新密碼為 1, 下列指令中的 0,代表刪除舊有密碼,會要求輸入新的密碼(待刪密碼之外的密碼),才能刪除,完成後若重複step1,可看見只剩下一組密碼。

sudo cryptsetup luksKillSlot [encrypted device] 0


Reference:
[1]  Change password for encrypted filesystem | eazynet.de
http://www.eazynet.de/change_password_for_encrypted_filesystem
[2] [ubuntu] [SOLVED] encrypted filesystem password change? - Ubuntu Forums
http://ubuntuforums.org/showthread.php?t=972122

沒有留言: