iRedMail. Change password complexity

I will give an example of changing the requirements for password complexity in iRedAdmin, they are used to check the entered password, for example, when creating a user or simply changing a password for a user. However, I do not recommend downgrading them.

Let’s see the standard parameters:

sudo cat /opt/www/iredadmin/libs/default_settings.py | grep PASSWORD_HAS
sudo cat /opt/www/iredadmin/libs/default_settings.py | less

In my case, the parameters were displayed:

PASSWORD_HAS_LETTER = True
PASSWORD_HAS_UPPERCASE = True
PASSWORD_HAS_NUMBER = True
PASSWORD_HAS_SPECIAL_CHAR = True

If you need to change any, for example, disable the requirement for special characters in the password, then we will indicate separately at the end of the main configuration file (the default_settings.py file does not need to be edited):

sudo nano /opt/www/iredadmin/settings.py
PASSWORD_HAS_SPECIAL_CHAR = False

Once I needed to transfer an existing domain with several mailboxes to a server with iRedMail, I decided to do this through iRedAdmin, I knew the passwords and there was no special character in one password, so as not to bother the user who owned this mailbox, I temporarily disabled the requirement special characters, created a mailbox, and then turned it back on.

You can also change the minimum and maximum password length (0 is not limited, but requires at least 1 character. Also, iRedAdmin-Pro supports configuring these parameters for each domain on the domain settings page):

min_passwd_length = 8
max_passwd_length = 0

Restart the Apache2 web server to apply the changes:

sudo service apache2 restart

If using Nginx, then:

sudo service uwsgi restart

See my other articles on iRedMail

Leave a comment

Leave a Reply