Change email password with phpmyadmin to mailserver virtual emails

December 19, 2014 856 views
MySQL Email


I've successfully created mail server with this tutorial.

Is it possible to modify virtual users password with phpmyadmin?
If not, how can I do it in the command line.


1 Answer

You can use phpmyadmin to edit your users but may still need to manually type in the query (or use the tools to build your query and modify the password section. While I know that PHPMyAdmin can perform some basic functions via it's insert page I do not know if you'll be able to replicate the method used to set the password in the db.

ENCRYPT('firstpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16)))

so, if nothing else you could use an UPDATE statement to set your password using the above code, something like

UPDATE serveremail.virtual_users set password = ENCRYPT('newpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))) where id = '1'

replacing the user's ID and the new password you wish to use.

Have another answer? Share your knowledge.