From b2ff1e512fbd04935b11359117ba3a94f745068d Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Wed, 8 Sep 2021 19:13:12 +0800 Subject: [PATCH] Typo --- en_US/howto/reset.user.password.md | 99 ++++++++++++++---------------- html/reset.user.password.html | 81 +++++++++++------------- 2 files changed, 81 insertions(+), 99 deletions(-) diff --git a/en_US/howto/reset.user.password.md b/en_US/howto/reset.user.password.md index 01120156..59265744 100644 --- a/en_US/howto/reset.user.password.md +++ b/en_US/howto/reset.user.password.md @@ -2,6 +2,51 @@ [TOC] +## Reset password with scripts shipped in iRedAdmin(-Pro) + +### Reset password for one user + +iRedAdmin(-Pro) ships script `tools/reset_user_password.py` to help you reset +one user's password. For example, on CentOS 7 (iRedAdmin is installed under +`/opt/www/iredadmin`): + +``` +cd /opt/www/iredadmin/tools/ +python3 reset_user_password.py user@domain.ltd '123456' +``` + +Sample output: + +``` +[user@domain.ltd] Password has been reset. +``` + +### Reset passwords for multiple users with a CSV file + +If you need to update many users' passwords, another way is resetting passwords +with script shipped in iRedAdmin-Pro: `tools/update_password_in_csv.py`. It +reads the user email addresses and NEW passwords from a CSV file. + +The content is CSV file is: + +``` + +``` + +One mail user (and new password) per line. For example, file `new_passwords.csv`: + +``` +user1@domain.com pF4mTq4jaRzDLlWl +user2@domain.com SPhkTUlZs1TBxvmJ +user3@domain.com 8deNR8IBLycRujDN +``` + +Then run script with this file: + +``` +python3 update_password_in_csv.py new_passwords.csv +``` + ## Reset password with SQL/LDAP command line ### Generate password hash for new password @@ -50,60 +95,6 @@ LDAP client tools. `SSHA512` is recommended, but if you have some application which needs to perform authentication with ldap dn directly, then `SSHA` is preferred. -## Reset password with scripts shipped in iRedAdmin-Pro - -!!! attention - - iRedAdmin-Pro scripts support both SQL and LDAP backends. - -### Reset password for one user - -iRedAdmin-Pro ships script `tools/reset_user_password.py` to help you reset -one user's password. For example, on CentOS 7 (iRedAdmin is installed under -`/opt/www/iredadmin`): - -!!! attention - - You can find the iRedAdmin-Pro installation directory from this tutorial: - [Locations of configuration and log files of major components](./file.locations.html#iredadmin). - -``` -cd /opt/www/iredadmin/tools/ -python reset_user_password.py user@domain.ltd '123456' -``` - -Sample output: - -``` -[user@domain.ltd] Password has been reset. -``` - -### Reset passwords for multiple users with a CSV file - -If you need to update many users' passwords, another way is resetting passwords -with script shipped in iRedAdmin-Pro: `tools/update_password_in_csv.py`. It -reads the user email addresses and NEW passwords from a CSV file. - -The content is CSV file is: - -``` - -``` - -One mail user (and new password) per line. For example, file `new_passwords.csv`: - -``` -user1@domain.com pF4mTq4jaRzDLlWl -user2@domain.com SPhkTUlZs1TBxvmJ -user3@domain.com 8deNR8IBLycRujDN -``` - -Then run script with this file: - -``` -python update_password_in_csv.py new_passwords.csv -``` - ## See also * [Password hashes used/supported by iRedMail](./password.hashes.html) diff --git a/html/reset.user.password.html b/html/reset.user.password.html index 3e369c70..a5e39bdb 100644 --- a/html/reset.user.password.html +++ b/html/reset.user.password.html @@ -23,22 +23,53 @@ +

Reset password with scripts shipped in iRedAdmin(-Pro)

+

Reset password for one user

+

iRedAdmin(-Pro) ships script tools/reset_user_password.py to help you reset +one user's password. For example, on CentOS 7 (iRedAdmin is installed under +/opt/www/iredadmin):

+
cd /opt/www/iredadmin/tools/
+python3 reset_user_password.py user@domain.ltd '123456'
+
+ +

Sample output:

+
[user@domain.ltd] Password has been reset.
+
+ +

Reset passwords for multiple users with a CSV file

+

If you need to update many users' passwords, another way is resetting passwords +with script shipped in iRedAdmin-Pro: tools/update_password_in_csv.py. It +reads the user email addresses and NEW passwords from a CSV file.

+

The content is CSV file is:

+
<email> <new_password>
+
+ +

One mail user (and new password) per line. For example, file new_passwords.csv:

+
user1@domain.com pF4mTq4jaRzDLlWl
+user2@domain.com SPhkTUlZs1TBxvmJ
+user3@domain.com 8deNR8IBLycRujDN
+
+ +

Then run script with this file:

+
python3 update_password_in_csv.py new_passwords.csv
+
+

Reset password with SQL/LDAP command line

Generate password hash for new password

Storing password in plain text is dangerous, so we need to hash the password. @@ -81,46 +112,6 @@ sql> UPDATE mailbox SET password='{SSHA512}jOcGSlKEz95VeuLGecbL0MwJKy0yWY9foj LDAP client tools. SSHA512 is recommended, but if you have some application which needs to perform authentication with ldap dn directly, then SSHA is preferred.

-

Reset password with scripts shipped in iRedAdmin-Pro

-
-

Attention

-

iRedAdmin-Pro scripts support both SQL and LDAP backends.

-
-

Reset password for one user

-

iRedAdmin-Pro ships script tools/reset_user_password.py to help you reset -one user's password. For example, on CentOS 7 (iRedAdmin is installed under -/opt/www/iredadmin):

-
-

Attention

-

You can find the iRedAdmin-Pro installation directory from this tutorial: -Locations of configuration and log files of major components.

-
-
cd /opt/www/iredadmin/tools/
-python reset_user_password.py user@domain.ltd '123456'
-
- -

Sample output:

-
[user@domain.ltd] Password has been reset.
-
- -

Reset passwords for multiple users with a CSV file

-

If you need to update many users' passwords, another way is resetting passwords -with script shipped in iRedAdmin-Pro: tools/update_password_in_csv.py. It -reads the user email addresses and NEW passwords from a CSV file.

-

The content is CSV file is:

-
<email> <new_password>
-
- -

One mail user (and new password) per line. For example, file new_passwords.csv:

-
user1@domain.com pF4mTq4jaRzDLlWl
-user2@domain.com SPhkTUlZs1TBxvmJ
-user3@domain.com 8deNR8IBLycRujDN
-
- -

Then run script with this file:

-
python update_password_in_csv.py new_passwords.csv
-
-

See also