[MDEV-30384] Group mapping with pam_user_map does not work for ldap nested groups Created: 2023-01-11 Updated: 2023-02-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Plugin - pam |
| Affects Version/s: | 10.6.11 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Rilke | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | ldap, pam, pam_user_map | ||
| Environment: |
Debian 11 |
||
| Issue Links: |
|
||||||||
| Description |
|
It is possible to map LDAP users to mysql users with the pam_user_map module. It is also possible to map LDAP group members to mysql users. See: However. It is possible to nest groups in other groups. For example: User "foo" can be a member of the group "dba". Now you can map the group "dba" to the mysql-user "bar" like this in /etc/security/user_map.conf:
This is OK and is working fine. The user "foo" will be mapped to the user "bar" because of his membership in the group "dba".
Now i have a group called "admins". And i want all "admins" members to have the same permissions like the users in the "dba" group. Instead of adding every member of the group "admins" to the group "dba" it is possible to add the group "admins" to the group "dba". Like:
For this it is neccaserry to set "nss_nested_groups yes" in the nscld.conf I can see in the pam debug log that the mapping is working like for the "foo" user:
So i looks like the user is correctly mapped by PAM but still can't login to mysql. To give an example: PAM configuration:
User Mapping:
NSLCD Config:
I dont't know enough about PAM or LDAP to be sure the issue is caused by mariadb or by the mapping plugin. |