2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-12-03 06:19:12 -06:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > Reset user password< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-12-03 06:19:12 -06:00
< / head >
< body >
< div id = "navigation" >
2016-04-19 12:48:51 -05:00
< a href = "/index.html" target = "_blank" >
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-04-21 23:33:25 -05:00
// < a href = "./index.html" > Document Index< / a > < / div > < div class = "admonition note" >
2016-11-11 02:56:08 -06:00
< p class = "admonition-title" > This tutorial is available in other languages. < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > Help translate more< / a > < / p >
2016-04-24 09:21:04 -05:00
< p > < a href = "./reset.user.password-zh_CN.html" > 简体中文< / a > /< / p >
2016-04-21 23:33:25 -05:00
< / div >
< h1 id = "reset-user-password" > Reset user password< / h1 >
2015-02-01 05:22:03 -06:00
< blockquote >
< ul >
2015-02-05 06:05:07 -06:00
< li > SSHA512 is recommended for SQL backends, don't use MD5 unless you have a reason.< / li >
2015-02-01 05:22:03 -06:00
< li > BCRYPT is recommended for SQL backens on BSD systems.< / li >
< / ul >
< / blockquote >
2014-12-03 06:19:12 -06:00
< p > With MySQL or PostgreSQL backends, you can generate a password hash with
< code > openssl< / code > or < code > doveadm< / code > command first, then replace old one with this newly
generated one.< / p >
2015-08-19 08:11:02 -05:00
< p > For example: generate a SSHA512 password hash with < code > doveadm< / code > :< / p >
2015-02-01 05:22:03 -06:00
< pre > < code > $ doveadm pw -s 'ssha512' -p '123456'
{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=
2014-12-03 06:19:12 -06:00
< / code > < / pre >
2015-08-27 23:00:00 -05:00
< p > To generate a salted MD5 password hash, you can use < code > doveadm< / code > or < code > openssl< / code > :< / p >
2015-09-11 05:39:51 -05:00
< pre > < code > # doveadm pw -s 'MD5' -p '123456' | awk -F'{MD5}' '{print $2}'
$1$TDG8oXHb$6YB9NO5NZaZxku0xv6RsW0
2015-08-27 23:00:00 -05:00
# openssl passwd -1 123456
$1$fnWOb5X8$Ed6FYg9CLuWuUQplnwOQK/
< / code > < / pre >
2015-08-28 21:27:37 -05:00
< blockquote >
2015-09-11 05:39:51 -05:00
< p > < strong > Important note< / strong > : SOGo groupware doesn't support salted MD5 hash without a
prefix, so if you're going to use MD5 password hash with SOGo,
please prepend < code > {CRYPT}< / code > prefix in password hash. For example,
2015-08-28 21:27:37 -05:00
< code > {CRYPT}$1$TDG8oXHb$6YB9NO5NZaZxku0xv6RsW0< / code > .< / p >
< / blockquote >
2014-12-03 06:19:12 -06:00
< ul >
2015-08-19 08:11:02 -05:00
< li > Reset password for user < code > user@domain.ltd< / code > :< / li >
2014-12-03 06:19:12 -06:00
< / ul >
< pre > < code > sql> USE vmail;
2015-08-19 08:11:02 -05:00
sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj6UlUVfZ2O2SNkEExU3n42YJLXDbLnu3ghnIRBkwDMsM31q7OI0jY5B/5E=' WHERE username='user@domain.ltd';
2014-12-03 06:19:12 -06:00
< / code > < / pre >
< p > With OpenLDAP backend, you can reset it with phpLDAPadmin or other LDAP client
2015-02-01 05:22:03 -06:00
tools, < code > SSHA< / code > is preferred if you have other applications to authenticate
users against OpenLDAP.< / p >
2015-02-01 05:31:17 -06:00
< p > It's ok to use plain password temporarily, then login to Roundcube webmail
or iRedAdmin-Pro (with self-service enabled) to reset password immediately.
For example:< / p >
2015-08-26 23:51:21 -05:00
< pre > < code > sql> USE vmail;
sql> UPDATE mailbox SET password='{PLAIN}123456' WHERE username='user@domain.ltd';
2015-02-01 05:31:17 -06:00
< / code > < / pre >
2015-02-01 05:22:03 -06:00
< h2 id = "see-also" > See also< / h2 >
< ul >
< li > < a href = "./password.hashes.html" > Password hashes used/supported by iRedMail< / a > < / li >
2016-05-26 10:09:58 -05:00
< li > < a href = "./promote.user.to.global.admin.html" > Promote a mail user to be global admin< / a > < / li >
2016-05-19 06:51:20 -05:00
< / ul > < div class = "footer" >
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > BitBucket repository< / a > , and published under < a href = "http://creativecommons.org/licenses/by-nd/3.0/us/" target = "_blank" > Creative Commons< / a > license. You can < a href = "https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "http://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
< / div >
< script type = "text/javascript" >
2015-02-05 07:02:53 -06:00
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
2014-12-03 06:19:12 -06:00
< / script >
< / body > < / html >