Generate and Insert a new password for your Joomla Install from the Linux Command Line

Written by James McDonald

June 3, 2013

When resetting your Joomla password you may want to generate your own md5sum password.

I found an oddity with doing if from the command line. If you just echo the password

echo admin | md5sum
456b7016a916a4b178dd72b947c152b7  -

echo -n admin | md5sum
21232f297a57a5a743894a0e4a801fc3  -

Once you have your md5sum hash of the password you want. Login to the mysql client.

mysql -uroot -p



USE joomladbnamehere;
UPDATE jos_users SET password = '21232f297a57a5a743894a0e4a801fc3' where username = 'admin';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0


Submit a Comment

Your email address will not be published.

You May Also Like…

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...