Change password from MySQL CLI

Hi everyone,

I’d like to change the FREEPBX webinterface admin password via the mysql CLI. I know that it can be done by the webinterface, but I’d like to automate changing the password by using a bash script. I know the MySQL syntax I have to use, and I know the table I have to alter. But, what encryption bitstrength is used (SHA1128?)?

Thanks in advance!

Try this on?..on the cli

change values in the <> brackets

#echo “update ampusers set password_sha1=’echo -n <|sha1sum|cut -d ' ' -f 1’ where username=‘admin’;”|mysql -uroot -p asterisk

Can you give me an example of what I can change it into? Thanks!