vinstaller/files/bin/change_luks_pw
2022-03-06 21:59:06 +01:00

8 lines
258 B
Bash

#!/bin/sh
if ! [ "$(id -u)" -eq 0 ]; then
echo "Not root. Use: sudo $(basename $0)"
exit 1
fi
cryptsetup luksChangeKey $(cryptsetup status $(lvdisplay -m $(findmnt -vn -o SOURCE -T /)|grep "Physical volume"|awk '{print $3}')|grep device|awk '{print $2}')