add user script
This commit is contained in:
parent
7aeae4c8b8
commit
529b330674
11
adduser.sh
Normal file
11
adduser.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user