-
Notifications
You must be signed in to change notification settings - Fork 487
Password Management 2
Note: This page is useful for all Chamilo 2.* versions.
Every once in a while, we have to deal with passwords encryption and, because the password generation mechanism depends on deeply nested Symfony security code, we lose quite some time trying to remember how that stuff works.
For example, you might need to write a script that will generate new temporary passwords for your users, or you might want to check if passwords cannot be guessed too easily, for example comparing them to the string "12345678".
In order to do that, you need to understand how passwords work and how you can reproduce the hashing algorithm.
To be completed
To be completed
To be completed
To be completed
A $_configuration['password_requirements']
parameter in app/config/configuration.php
allows you to define minimum requirements like number of lowercase, uppercase, numeric and special characters as well as a minimum length.
In the platform settings, you will find a setting called password_requirements
. This offers you a text box and an example:
[
'min' => [
'lowercase' => 2,
'uppercase' => 2,
'numeric' => 2,
'length' => 8
]
]
This array allows you to make sure users set a different password than the previous one when requested to change password. This will not affect current passwords, only new generated or modified passwords.
If you need to enforce these requirements for all users immediately, you can either change the password change field for all users (in their profile) or just change all passwords and force users to ask for a new one as if they had forgotten theirs.
To ensure each user has an individual password, let the system generate passwords. It will automatically generate a random string that matches the password_requirements
.
The platform setting login_max_attempt_before_blocking_account
allows you to set a maximum number of login attempts
Once the user is locked out, only an admin can reactivate their account.
You can require users to change their password during their first login by enabling the force_renew_password_at_first_login
setting. The extra field (checkbox) ask_new_password
in the user profile can then be changed by admins, and all new users connecting for the first time will be requested to change their password.
Not implemented yet.
Not implemented yet.
Not implemented yet.
One "easy" way to remediate a lost password as admin when an e-mail reminder is not a solution is to copy the password
and salt
fields from the user table in another Chamilo 2 installation where you do remember your password.
-
Home
- Tools and sessions
- Quiz: Importing
- Releases
- Community support strategy
- Translation management
- How to report issues
- Development
- Integration