diff --git a/README.md b/README.md index 364cef8c..b74ad20d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ We're migrating [old wiki documents](http://www.iredmail.org/wiki) to Markdown f * [Monitor incoming and outgoing mails with BCC](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/monitor.incoming.and.outgoing.mails.with.bcc.md) * [Pipe incoming email for certain user to external script ](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/pipe.incoming.email.for.certain.user.to.external.script.md) * [Force Dovecot to recalculate mailbox quota](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/recalculate.mailbox.quota.md) +* [Reset user password](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/reset.user.password.md) * [SQL: Create domain catch-all account for SQL backend](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/sql.create.domain.catchall.account.md) * [SQL: Create an mail alias account with SQL command line](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/sql.create.mail.alias.md) * [Store SpamAssassin bayes in SQL](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/store.spamassassin.bayes.in.sql.md) diff --git a/TODO.md b/TODO.md index 8737784b..b0235b84 100644 --- a/TODO.md +++ b/TODO.md @@ -2,9 +2,7 @@ # New -* http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Monitor.Incoming.and.Outgoing.Mails.with.BCC -* http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Turn.On.Debug.Mode.In.OpenLDAP -* http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Reset.password.for.mail.user +* iRedMail upgrade tutorials * Upgrade iRedAPD: http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Upgrade.iRedAPD * How to enable SSHA512/BCRYPT in Dovecot + Roundcubemail. * How to custom SpamAssassin scores @@ -12,6 +10,7 @@ * How to enable DNSBL in Postfix. * http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Send.out.email.from.specified.IP.address + # installation guides * http://www.iredmail.org/wiki/index.php?title=Install/iRedMail/FreeBSD.Jail @@ -57,6 +56,9 @@ # Howto +* ~~ http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Reset.password.for.mail.user ~~ +* ~~http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Monitor.Incoming.and.Outgoing.Mails.with.BCC~~ +* ~~http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/LDAP/Turn.On.Debug.Mode.In.OpenLDAP~~ * ~~ http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Quarantining.Clean.Mail ~~ * ~~ http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Quarantining.SPAM ~~ diff --git a/howto/reset.user.password.md b/howto/reset.user.password.md new file mode 100644 index 00000000..0037504c --- /dev/null +++ b/howto/reset.user.password.md @@ -0,0 +1,35 @@ +# Reset user password + +With MySQL or PostgreSQL backends, you can generate a password hash with +`openssl` or `doveadm` command first, then replace old one with this newly +generated one. + +For example: + +* Generate a salted MD5 password hash with `openssl` (plain password is `123456` +in this case): + +``` +$ openssl passwd -1 123456 +$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0 +``` + +Or, generate password hash with `doveadm`: + +``` +$ doveadm pw -s 'ssha' -p '123456' +{SSHA}MU5Y8OfD9HylnHk4UQaVyaJf6Lugx6vt +``` + +* Reset password for user `user@domain.ltd` and `another-user@domain.ltd`: + +``` +sql> USE vmail; +sql> UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='user@domain.ltd'; +sql> UPDATE mailbox SET password='{SSHA}MU5Y8OfD9HylnHk4UQaVyaJf6Lugx6vt' WHERE username='another-user@domain.ltd'; +``` + +With OpenLDAP backend, you can reset it with phpLDAPadmin or other LDAP client +tools, `SSHA` is preferred. + +Reference: [how to use or migrate password hashes](./password.hashes.html) diff --git a/html/index.html b/html/index.html index 7d8f0f10..21443be4 100644 --- a/html/index.html +++ b/html/index.html @@ -43,6 +43,7 @@
  • Monitor incoming and outgoing mails with BCC
  • Pipe incoming email for certain user to external script
  • Force Dovecot to recalculate mailbox quota
  • +
  • Reset user password
  • SQL: Create domain catch-all account for SQL backend
  • SQL: Create an mail alias account with SQL command line
  • Store SpamAssassin bayes in SQL
  • diff --git a/html/reset.user.password.html b/html/reset.user.password.html new file mode 100644 index 00000000..fce4af67 --- /dev/null +++ b/html/reset.user.password.html @@ -0,0 +1,54 @@ + + + + Reset user password + + + + +

    Reset user password

    +

    With MySQL or PostgreSQL backends, you can generate a password hash with +openssl or doveadm command first, then replace old one with this newly +generated one.

    +

    For example:

    + +
    $ openssl passwd -1 123456
    +$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0
    +
    + +

    Or, generate password hash with doveadm:

    +
    $ doveadm pw -s 'ssha' -p '123456'
    +{SSHA}MU5Y8OfD9HylnHk4UQaVyaJf6Lugx6vt
    +
    + + +
    sql> USE vmail;
    +sql> UPDATE mailbox SET password='$1$2dQ48hyz$.mCLeDSdPkP3fxVmARsB.0' WHERE username='user@domain.ltd';
    +sql> UPDATE mailbox SET password='{SSHA}MU5Y8OfD9HylnHk4UQaVyaJf6Lugx6vt' WHERE username='another-user@domain.ltd';
    +
    + +

    With OpenLDAP backend, you can reset it with phpLDAPadmin or other LDAP client +tools, SSHA is preferred.

    +

    Reference: how to use or migrate password hashes


    If you found something wrong +in this document, please do +contact us to fix it.

    This tutorial is published under a CC BY-ND 3.0 license. + + + \ No newline at end of file