Here’s how to convert passwords from plain text to the alghorithm used by Magento.
This can result useful when you need to import users from an external application which was managing passwords with no encryption.
So, let’s assume we already imported the customers from magento import tool and they can’t login because their password don’t fit Magento’s way, which is defined this way ( read it as a PHP developer ):
So, to convert all customers passwords you only need to login into mysql and run a single query:
mysql -u root -e "UPDATE customer_entity_varchar SET value = CONCAT( MD5(CONCAT('salt', value)), ':salt') WHERE attribute_id = '12'" -- don't care about my local config 😉
Source : http://odino.org/convert-a-password-the-magento-way/