Create avantfax-pw-change
Create password change script for avantfax
This commit is contained in:
parent
0ed1acb5ce
commit
354e0908c6
16
avantfax-pw-change
Normal file
16
avantfax-pw-change
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
clear
|
||||||
|
echo "This script changes your AvantFAX admin password"
|
||||||
|
echo " "
|
||||||
|
|
||||||
|
echo -n "Enter new admin password (MAKE IT SECURE!!): "
|
||||||
|
read adminpw
|
||||||
|
echo " "
|
||||||
|
echo "admin password will be changed to: $adminpw"
|
||||||
|
read -p "Press ENTER key to continue or Ctrl-C to abort..."
|
||||||
|
|
||||||
|
mysql -u root -ppassw0rd -e "update avantfax.UserAccount set password = '`echo -n "$adminpw" | md5sum | awk '{ print $1 }'`' where username = 'admin' limit 1;"
|
||||||
|
mysql -u root -ppassw0rd -e "insert into avantfax.UserPasswords set uid = 1, pwdhash = '`echo -n "$adminpw" | md5sum | awk '{ print $1 }'`';"
|
||||||
|
echo " "
|
||||||
|
echo "Done. Use browser to access AvantFAX via link in FreePBX at http://`ifconfig | awk -F "[: ]+" '/inet addr:/ { if ($4 != "127.0.0.1") print $4 }'`"
|
||||||
|
echo " "
|
Loading…
Reference in New Issue
Block a user