From d0cb5c52c3bab16da2b5dc228cc7fad42332a973 Mon Sep 17 00:00:00 2001 From: Jimmy Axenhus Date: Tue, 6 Apr 2021 08:08:47 +0200 Subject: Make sure password files are owned by root --- prepare-vpn-usb.sh | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3