1
0
Fork 0
mirror of synced 2025-04-06 22:53:37 +03:00
setup-ipsec-vpn/adduser.sh
2017-05-25 19:31:19 -04:00

11 lines
261 B
Bash

echo "Enter username"
read username
if grep "^"$username":" /etc/ipsec.d/passwd
then
echo "username exist"
exit 1
fi
echo "Enter password"
read password
password=$(openssl passwd -1 "$password")
echo $username":"$password":xauth-psk" >> /etc/ipsec.d/passwd