我的 Ubuntu 上有一个加密分区(使用 cryptsetup 加密)。
目前,我使用以下命令挂载分区
sudo cryptsetup luksOpen /dev/sda1 backup && wait && sudo mount /dev/mapper/backup /backup
它会提示您进行释义。
那么有没有办法将此行放入脚本中并自动挂载分区(以便进行每日备份),如下所示:
sudo cryptsetup luksOpen /dev/sda1 backup < paraphrase
或更好:
sudo cryptsetup luksOpen /dev/sda1 backup < hashed_paraphrase
最佳答案
来自 cryptsetup(8)
手册页:
--key-file, -d name Read the passphrase from file. If the name given is "-", then the passphrase will be read from stdin. In this case, reading will not stop at newline charac‐ ters.
关于linux - 自动挂载加密分区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36405906/