[MDEV-10457] simple_password_check is incompatible with pam Created: 2016-07-28 Updated: 2020-08-25 Resolved: 2019-01-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Plugin - pam, Plugins |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.4.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Robin Peiremans | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
When the simple_password_check plugin is active and you create a new user that is authenticated through pam, password verification fails. In a way this makes sense, as a pam authenticated user has a zero-length password. Using the pam plugin doesn't mean all users are pam authenticated (root for example should, imo, never be externally authenticated). For these users it would still make sense to be able to prohibit weak passwords. I would thus like to request the password check to add support for externally authenticated users so both plugins can be used at the same time. |
| Comments |
| Comment by Sergei Golubchik [ 2016-07-28 ] | |||||||||||||||||||||||
|
Would it help, if you set strict_password_validation to false? If not, it can be considered a bug. | |||||||||||||||||||||||
| Comment by Robin Peiremans [ 2016-07-29 ] | |||||||||||||||||||||||
|
Unfortunately that doesn't help:
| |||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2016-07-29 ] | |||||||||||||||||||||||
|
Okay, thanks. I think we can extend strict_password_validation variable to also cover the case of non-builtin plugins. Password validation works like this:
when non-builtin plugins are used, mariadb considered it to be a case 2, but it is arguably a case 3, so should be affected by strict_password_validation variable | |||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2019-01-14 ] | |||||||||||||||||||||||
|
The PAM authentication plugin doesn't allow MariaDB to change passwords at all, so MariaDB's password validation is irrelevant to it. I think it would require implementing pam_sm_chauthtok in auth_pam to allow it to change passwords. http://www.linux-pam.org/Linux-PAM-html/mwg-expected-of-module-chauthtok.html Would it make sense to modify the authentication plugin API to create a way to allow authentication plugins like auth_pam to exempt themselves from password validation? Is it likely that auth_pam will ever be capable of changing passwords, so MariaDB's password validation would become relevant? I noticed that | |||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-01-14 ] | |||||||||||||||||||||||
|
Yes, you're right. |