Use
Once ezmbpaex is set up (see Setting up password expiry), password expiry is managed in the Users tab, on the user groups and the user accounts. This page explains the field it adds, what users see when their password expires, the warning mail, how a group passes its values on, who may change the values, and the audit log.
The Password Expiration field
The extension adds the field type Password Expiration. Added to the classes User and User group, it appears in their edit form with:
| Field | What it sets |
|---|---|
| Password LifeTime (DAYS) | Days a password stays valid. 0: it never expires. |
| Expiration Notification (SECONDS) | How long before expiry the warning mail is sent. |
| Validation Regexp | A regular expression a new password must match; empty uses the site's setting. |
| Current password status | Shown on a user: active or expired. |
| Update children nodes? | Shown on a group: pass these values on to everything below it (see below). |
A new field takes the values of mbpaex.ini as its defaults. The kernel's own password rules still apply on top: see Password rules and expiry.
When a password expires
A user whose password has expired cannot work until it is changed: at sign-in, the extension sends the user to its own password page (userpaex/password), which is open without being signed in. The new password must differ from the old one and match the rules. After the change the user signs in as usual.
The warning mail
The scheduled job ezmbpaex_send_expiry_notifications looks for users whose password expires within the notification time and sends each of them one mail, so they can change the password in time. Each user gets one warning per expiry. To run it by hand, from the installation root:
php runcronjobs.php ezmbpaex_send_expiry_notifications
Values per group: Update children
To give a whole group other values, for example a shorter lifetime for administrators, edit the group, set the values, tick Update children nodes? and publish. The group's page then notes that its children wait for the update. The scheduled job ezmbpaex_updatechildren copies the values to every user and group below it; the work is done by the job so that publishing stays quick. Updates run from the outer groups to the inner ones: a group below that is itself marked passes its own values on, not those of the group above. To run it by hand:
php runcronjobs.php ezmbpaex_updatechildren
The job runs as the user named by UpdateChildrenUser in mbpaex.ini, who must be able to read the Users section.
The policies a group has. To let someone other than an administrator edit the password expiry data, a role needs a policy of the userpaex module.
Who may change the values
The extension's module userpaex has two policy functions:
- editpaex: may change the password expiry values of users and groups. Administrators have it; give it to another role in Users > Roles and policies with New policy, module userpaex, function editpaex.
- password: may use the extension's password page.
See Roles and policies.
The audit log
The extension writes its events to the audit log files of the installation, one file per kind, named in its audit.ini: password_change.log (changed by an administrator), password_change_self.log and failed_password_change_self.log (changed by the user, or refused), and forgotpassword.log and failed_forgotpassword.log. They are in the audit directory of the var directory (audit.ini [AuditSettings] LogDir, log/audit as shipped), and are written while Audit=enabled, the shipped value. The kernel records its own password events in Users > User audit log as well.
What can go wrong
- The values of a group did not reach its users. The job ezmbpaex_updatechildren has not run yet, or is not scheduled.
- A user is asked to change the password every day. The lifetime is very short; the extension's own mbpaex.ini ships with 3 days. Set the lifetime on the group, or DefaultPasswordLifeTime in an override.
- The new password is refused although it seems fine. It must differ from the old one, match the field's regular expression and meet the site's own password rules.
Read more
- ezmbpaex: password expiry and validation, in the help center.
- The user audit log
- Forgot Password Function
Contributors
- Ricardo Correia
- Graham Brookins Updated Maintainer
Comments
Add a comment