Page 1 of 1

Changing Cron pass ,which files to modify???

PostPosted: Sun Feb 21, 2016 6:41 pm
by boiken
Hello everybody
I have changed the password for the cron user in the database.

Which files do i have to modify ??

astguiclient.conf
/etc/asterisk/manager.conf
.../agc/dbconnect.php
.../vicidial/dbconnect.php

Only this one's?

Do i have to do another additional step?

Thanks

Re: Changing Cron pass ,which files to modify???

PostPosted: Sun Feb 21, 2016 6:44 pm
by williamconley
Old script. Still works for some versions. Certainly a place to start.
Code: Select all
cd /usr/share/astguiclient
wget http://www.poundteam.com/downloads/scripts/perl/ADMIN_update_cron_pass.pl.txt
mv ADMIN_update_cron_pass.pl.txt ADMIN_update_cron_pass.pl
chmod +x ADMIN_update_cron_pass.pl
perl ADMIN_update_cron_pass.pl

Re: Changing Cron pass ,which files to modify???

PostPosted: Sun Feb 21, 2016 6:57 pm
by boiken
I have tried this script before.but it doesnt run.i shows a perl error.

I inspected the scripts and did manually what it does.

is it ok to change the password only on the above files ?

Re: Changing Cron pass ,which files to modify???

PostPosted: Sun Feb 21, 2016 7:02 pm
by williamconley
nope. you also need to run some mysql scripts.

find the perl error and fix it.

Re: Changing Cron pass ,which files to modify???

PostPosted: Mon Feb 22, 2016 11:32 am
by boiken
Ok i did it !

i was running directly the file and it was showing this error " -bash: /usr/ADMIN_update_cron_pass.pl: /usr/bin/perl^M: bad interpreter: No such file or directory"

then i tried using # perl /usr/ADMIN_update_cron_pass.pl

it worked like a charm !

Re: Changing Cron pass ,which files to modify???

PostPosted: Mon Feb 22, 2016 6:20 pm
by boiken
what to do if i want to change the password in a cluster installation ?

Re: Changing Cron pass ,which files to modify???

PostPosted: Mon Feb 22, 2016 6:31 pm
by williamconley
SQL scripts have to be run on the DB server. Otherwise, there's no difference. Just be sure the password is the same on all servers for best results.

Re: Changing Cron pass ,which files to modify???

PostPosted: Sun Mar 06, 2016 9:45 am
by boiken
Hello WilliamConley

I have for the moment a Cluster of 2 servers

1.DB+Web+Phone
2.Phone

VERSION: 2.12-538a
BUILD: 160122-1401
SVN Version: 2480
DB Schema Version: 1452

After doing some other test i've noticed that if i want to change the cron password it changes it only for the DB Server (in the servers tables and phones table).
And after that i had problems connecting them together.
What ive done was modifying the ADMIN_update_cron_password.pl line from this:
Code: Select all
$stmtA = "UPDATE servers SET ASTmgrSECRET='$VARpassword' where server_ip='$VARserver_ip';";

to this one :
Code: Select all
$stmtA = "UPDATE servers SET ASTmgrSECRET='$VARpassword' ; ";


after this ,it changes the Cron pass on all servers in the database.
Maybe i need to make the same modification on the 3 other lines :

Code: Select all
$stmtA = "UPDATE phones SET ASTmgrSECRET='$VARpassword' where server_ip='$VARserver_ip';";

Code: Select all
$stmtA = "UPDATE phones SET DBX_pass='$VARpassword' where server_ip='$VARserver_ip';";

Code: Select all
$stmtA = "UPDATE phones SET DBY_pass='$VARpassword' where server_ip='$VARserver_ip';";


Am i right ?

Thanks

Re: Changing Cron pass ,which files to modify???

PostPosted: Sun Mar 06, 2016 1:51 pm
by williamconley
you also have to change it in the astguiclient.conf file.