aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Axenhus <github att axenhus doot com>2021-04-06 08:08:47 +0200
committerGitHub <noreply att github doot com>2021-04-06 08:08:47 +0200
commitd0cb5c52c3bab16da2b5dc228cc7fad42332a973 (patch)
tree8931c2cc031f4e880220c9dda8e2199ce1e8a523
parent1311cabdf020f198c479aa1245dff80f99aef9a3 (diff)
downloadqubes-vpn-2fa-certificate-d0cb5c52c3bab16da2b5dc228cc7fad42332a973.tar.bz2
qubes-vpn-2fa-certificate-d0cb5c52c3bab16da2b5dc228cc7fad42332a973.tar.zst
qubes-vpn-2fa-certificate-d0cb5c52c3bab16da2b5dc228cc7fad42332a973.zip
Make sure password files are owned by root
-rwxr-xr-xprepare-vpn-usb.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/prepare-vpn-usb.sh b/prepare-vpn-usb.sh
index 5d8815a..0c3653b 100755
--- a/prepare-vpn-usb.sh
+++ b/prepare-vpn-usb.sh
@@ -36,6 +36,7 @@ if [ ! -e /tmp/vpn-ramdisk/key-pass.txt ]; then
read -s -r -p "Key password: " keypassword
echo
touch /tmp/vpn-ramdisk/key-pass.txt
+ chown root:root /tmp/vpn-ramdisk/key-pass.txt
chmod 0600 /tmp/vpn-ramdisk/key-pass.txt
cat <<< "$keypassword" > /tmp/vpn-ramdisk/key-pass.txt
fi
@@ -45,6 +46,7 @@ if [ ! -e /tmp/vpn-ramdisk/userpassword.txt ]; then
read -s -r -p "Password: " upassword
echo
touch /tmp/vpn-ramdisk/userpassword.txt
+ chown root:root /tmp/vpn-ramdisk/userpassword.txt
chmod 0600 /tmp/vpn-ramdisk/userpassword.txt
cat <<< "$username" > /tmp/vpn-ramdisk/userpassword.txt
cat <<< "$upassword" >> /tmp/vpn-ramdisk/userpassword.txt

Code dump for some of my projects as well as a mirror for other random or interesting projects. You can find my site at jimmy.axenhus.com