1
0
mirror of synced 2025-02-22 23:13:15 +03:00

add user script

This commit is contained in:
peiying yang 2017-05-25 19:31:19 -04:00
parent 7aeae4c8b8
commit 529b330674

11
adduser.sh Normal file
View File

@ -0,0 +1,11 @@
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