Question

Change email password with phpmyadmin to mailserver virtual emails

Posted December 19, 2014 2.8k views
MySQL Email

Hi,

I’ve successfully created mail server with this tutorial.
https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin

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

Thanks

edited by ryanpq

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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.

Submit an Answer