1
0
Fork 0
mirror of synced 2025-04-06 22:53:37 +03:00
setup-ipsec-vpn/adduser.sh
Peiying Yang(Brian) 0adbd6ccec Update adduser.sh
2017-05-27 23:02:02 -04:00

13 lines
274 B
Bash

#!/bin/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