目前,我这样做是为了挂载我的加密拇指驱动器:
# Works!
pass thumbdrive-password | # get device password entry from password manager
head -n 1 | # get the device password itself
sudo cryptsetup luksOpen /dev/sdb thumbdrive # unlock device
udisksctl mount -b /dev/mapper/thumbdrive # mount device
我想做这样的事情:
# Does not work!
pass thumbdrive-password |
head -n 1 |
udisksctl unlock -b /dev/sdb # unlock device
udisksctl mount -b /dev/mapper/luks-foobar # mount device with uuid "foobar"
这将允许半特权用户(org.freedesktop.udisks2.filesystem-mount
在 polkit 中有权限)在不使用 sudo 的情况下挂载加密的文件系统。Udisks 不会接受这种管道方法,因为它使用交互式密码提示。udisksctl unlock
如何在不手动输入的情况下提供我的设备密码?