Gui failure with 2.0 and resolution

gazmac52

Joined
Jun 3, 2009
Messages
6
Likes
0
Points
0
#1
Hi, I installed 2.0 but the gui continually failed.
After extensive searching and testing I found that the AMPDBPASS= password in /etc/amportal.conf was wrong.
My password had '&'('and' or ampersand character) in it like this new&pass for example.
The line in amportal.conf was like this:
AMPDBPASS=newAMPDBPASS=eLaStIx.asteriskuser.2oo7s
After changing it to:
AMPDBPASS=new&pass everything worked fine.
This causes problems with admin login as well. To change the admin login do this:
at the command prompt type the following ( in any directory ):
/usr/bin/sqlite3 /var/www/db/acl.db "UPDATE acl_user SET md5_password = '`echo -n newpass|md5sum|cut -d ' ' -f 1`' WHERE name = 'admin'"

Change "newpass" to your desired new password.
Do not use '&'('and' or ampersand character) in passwords when installing.

Question, how do I change AMPDBPASS to a new pass without '&' in it? I do not want to re-install just to fix passwords.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Answer, something like this:

Code:
NEWPASS=newpass
echo "UPDATE asterisk.ampusers SET password_sha1=sha1('$NEWPASS') WHERE username = 'admin';" | mysql -u root -p`cat /etc/elastix.conf|grep mysqlrootpwd|cut -d '=' -f2`
sed -i s"/^AMPDBPASS=.*/AMPDBPASS=$NEWPASS/" /etc/amportal.conf
sed -i s"/^dbpass.*/dbpass = $NEWPASS/" /etc/asterisk/res_mysql.conf 
sed -i s"/^password=.*/password=$NEWPASS/" /etc/asterisk/cbmysql.conf 
sed -i s"/^password.*/password = $NEWPASS" etc/asterisk/cdr_mysql.conf

turn it into a script and it should work as a good prophylactic against hack-attacks if run every once in a while
ref:

http://bugs.elastix.org/view.php?id=598
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,902
Messages
130,887
Members
17,565
Latest member
omarmenichetti
Top