How to generate a valid Magento customer password via shell script

Last modified by amartinez on Fri, June 25, 2010 09:49
Source|Old Revisions  

To properly use of my cron_import_customers.php script, the “password_hash” row must contain a valid md5 string.

Well, this script do it for you:


# Genera una clave md5 con palabra de paso
# @copyright  copyright (c) 2009 toniyecla[at]
# @license open software license (OSL 3.0)

if [ $# -ne 2 ]; then
    echo "Uso: $0 <clave> <palabra_de_paso>"
    echo "     $0 pass AZ"
    exit 1 

clave=`echo -n "$2$1" | md5sum`
clave=${clave/'  -'/':'$2}

echo $clave

Hope this help!


Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs