Bug 1727236
| Summary: | usermod fails to report failure while adding local user to network group | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Arpit Tolani <atolani> |
| Component: | shadow-utils | Assignee: | Iker Pedrosa <ipedrosa> |
| Status: | CLOSED ERRATA | QA Contact: | sssd-qe <sssd-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | CC: | dapospis, ipedrosa, nmavrogi, pkulkarn, sgadekar, sgoveas, ssorce, tmraz |
| Target Milestone: | beta | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | sync-to-jira | ||
| Fixed In Version: | shadow-utils-4.6-10.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-11-04 01:42:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Arpit Tolani
2019-07-05 07:03:16 UTC
This would require adding a check whether any of the groups listed in the -G option is non-local. Currently the code goes through all local groups and if it finds matching one in -G it will do the modification. So that basically means the non-local groups are currently completely ignored. Should be done upstream first. This bug is incorrectly defined. With the merge group option in nsswitch.conf you can have members of a group defined both in the local database and the network database. So it is incorrect to refuse to add a user to agroup just based on the provenance of the group. The merge option need also to be considered in this case and a local group may be created if the merge option is present. Creating a local group if merge option is enabled would be a RFE. Reporting error properly would be a bug fix, anyway this is for upstream and I do not plan to work on this one any time soon. * master
f929bfd90b3a469fae4494da243e1a9e0fbdf9d5 - Check only local groups when adding new supplementary groups to a user
Tested with following results. ]# rpm -q shadow-utils shadow-utils-4.6-10.el8.x86_64 ]# cat /etc/sssd/sssd.conf [sssd] services = nss, pam config_file_version = 2 domains = LDAP [nss] [pam] [domain/LDAP] debug_level = 9 ldap_id_use_start_tls = True cache_credentials = True ldap_search_base = dc=my-domain,dc=com ldap_group_search_base = ou=Groups,dc=my-domain,dc=com id_provider = ldap auth_provider = ldap ldap_group_object_class = posixGroup ldap_user_object_class = posixAccount ldap_schema = rfc2307 ldap_uri = ldap://my-domain.com ldap_tls_cacertdir = /etc/openldap/cacerts [root@ci-vm-10-0-137-249 tmp.36cqGpUzYF]# getent passwd -s files localuser_test localuser_test:x:1000:1000::/home/localuser_test:/bin/bash [root@ci-vm-10-0-137-249 tmp.36cqGpUzYF]# egrep ldapgroup /etc/group [root@ci-vm-10-0-137-249 tmp.36cqGpUzYF]# getent group ldapgroup ldapgroup:*:100000:ldaptester [root@ci-vm-10-0-137-249 tmp.36cqGpUzYF]# usermod -a -G ldapgroup localuser_test usermod: group 'ldapgroup' does not exist I think we could return a error message about the failure of usemod operation. Here error message mentions that 'group does not exist'. That is not true. A ldap-group with name 'ldapgroup' does exist. This might confuse users. Do you think that error message could be improved upon current error message? Marking verified as usermod is returning error on failure of usermod operation. setting needinfo on comment 17 Shridhar and I spoke about this point and agreed that a rewording of the message is necessary. I'll propose a patch upstream to take care of it, but it won't be available for RHEL8.3. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (shadow-utils bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:4467 |