URL: https://github.com/SSSD/sssd/pull/5608 Title: #5608: nss: fix getsidbyname for IPA user-private-groups
elkoniu commented: """ Use case from source bugzilla (https://bugzilla.redhat.com/show_bug.cgi?id=1837090): ``` [root@master ~]# ipa user-add some-user First name: Some Last name: User ---------------------- Added user "some-user" ---------------------- User login: some-user First name: Some Last name: User Full name: Some User Display name: Some User Initials: SU Home directory: /home/some-user GECOS: Some User Login shell: /bin/sh Principal name: [email protected] Principal alias: [email protected] Email address: [email protected] UID: 1908200011 GID: 1908200011 Password: False Member of groups: ipausers Kerberos keys available: False [root@master ~]# id IPA\\some-user uid=1908200011(some-user) gid=1908200011(some-user) groups=1908200011(some-user) [root@master ~]# python Python 3.8.2 (default, Feb 28 2020, 00:00:00) [GCC 10.0.1 20200216 (Red Hat 10.0.1-0.8)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pysss_nss_idmap >>> pysss_nss_idmap.getsidbyname('IPA\\admin') {'IPA\\admin': {'sid': 'S-1-5-21-3787809381-104084847-3373960542-500', 'type': 1}} >>> pysss_nss_idmap.getsidbyname('IPA\\some-user') {} >>> pysss_nss_idmap.getsidbyname('IPA\\some-user') {} >>> ``` Result of this PR build deployed (`elmer2` - existing user, `elmer3` - non existing user): ``` [[email protected] /build/sssd/x86_64 (PR-5608 *%)]$ ipa user-add elmer2 First name: Elmer Last name: Second ------------------- Added user "elmer2" ------------------- User login: elmer2 First name: Elmer Last name: Second Full name: Elmer Second Display name: Elmer Second Initials: ES Home directory: /home/elmer2 GECOS: Elmer Second Login shell: /bin/sh Principal name: [email protected] Principal alias: [email protected] Email address: [email protected] UID: 356000006 GID: 356000006 Password: False Member of groups: ipausers Kerberos keys available: False [[email protected] /build/sssd/x86_64 (PR-5608 *%)]$ id IPA\\elmer3 id: ‘IPA\\elmer3’: no such user [[email protected] /build/sssd/x86_64 (PR-5608 *%)]$ id IPA\\elmer2 uid=356000006(elmer2) gid=356000006(elmer2) groups=356000006(elmer2) [[email protected] /build/sssd/x86_64 (PR-5608 *%)]$ python Python 3.7.9 (default, Aug 19 2020, 17:05:11) [GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pysss_nss_idmap >>> pysss_nss_idmap.getsidbyname('IPA\\admin') {'IPA\\admin': {'sid': 'S-1-5-21-1923584740-778949710-2051978183-500', 'type': 1}} >>> pysss_nss_idmap.getsidbyname('IPA\\elmer2') {'IPA\\elmer2': {'sid': 'S-1-5-21-1923584740-778949710-2051978183-1006', 'type': 1}} >>> pysss_nss_idmap.getsidbyname('IPA\\elmer3') {} ``` """ See the full comment at https://github.com/SSSD/sssd/pull/5608#issuecomment-842701820
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected] Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
