Red Hat Bugzilla – Bug 1425891
Support delivering non-POSIX users and groups through the IFP and PAM interfaces
Last modified: 2017-08-01 05:02:33 EDT
This bug is created as a clone of upstream ticket: https://fedorahosted.org/sssd/ticket/3310 Many projects depend on SSSD now to support application integration through Apache modules or directly through SSSD's D-Bus interface. And often, the users and groups in the directory have no POSIX attributes. We should support these use-cases, in particular: * look up users and groups through the D-Bus interface * look up group membership through the D-Bus interface including membership in non-POSIX groups * test authentication and access control through PAM
* master: * 861ab44e8148208425b67c4711bc8fade10fd3ed * 3e39806177e1cd383743ff596cb96df44a6ce8c9 * ed0cdfcacc44e4e13e1524e254efa744610a87c2 * 901396366075dc3e3fcc0894345af1b51052ac69 * 5f7f249f2a8a1c7284e991aa64dbf850d482b0aa * 3e789aa0bd6b7bb6e62f91458b76753498030fb5 * 57eeec5d735c7a3bbe58299fded97414626d85f1 * b010f24f4d96d15c5c85021bb4aa83db25cd3df5 * 35f0f5ff9dac790f6c947190fcdc00d01ae9077c * cee85e8fb9534ec997e5388fce59f392cf029573 * 825e8bf2f73a815c2eceb36ae805145fcbacf74d * 6324eaf1fb321c41ca9883966118df6d45259b7e
Verified against sssd-1.15.2-33.el7.x86_64 # Testing GetUserGroups [root@beast sssd]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserGroups string:sssd_noposix method return sender=:1.206 -> dest=:1.215 reply_serial=2 array [ string "s-1-5-21-152790264-1257272937-3685563408-513" ] [root@beast sssd]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserGroups string:sssd_posix method return sender=:1.206 -> dest=:1.216 reply_serial=2 array [ string "s-1-5-21-152790264-1257272937-3685563408-513" ] # Testing GetUserAttr [root@beast sssd]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_posix array:string:telephoneNumber method return sender=:1.206 -> dest=:1.217 reply_serial=2 array [ dict entry( string "telephoneNumber" variant array [ string "1111111111" ] ) ] [root@beast sssd]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_noposix array:string:telephoneNumber method return sender=:1.206 -> dest=:1.218 reply_serial=2 array [ dict entry( string "telephoneNumber" variant array [ string "2222222222" ] ) ]
(In reply to Dan Lavu from comment #14) > Verified against sssd-1.15.2-33.el7.x86_64 > Please test with the latest version of sssd. There was fixed bug related to GetUserGroups bz#1449729 There is also missing info about users in ldap "sssd_noposix". Non-posix user means that the users in LDAP will not have UID/GID. (and UID/GID cannot be generated by ID-mapping from SID).
Lukas, Correct no posix, did not have the uid/gid/gecos attribute, will test again today.
After Lukas's seal of approval I'll mark this as verified. Tested against sssd-1.15.2-43.el7.x86_64 # dbus returns group name not SID dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserGroups string:sssd_noposix method return sender=:1.86 -> dest=:1.100 reply_serial=2 array [ string "domain users" ] # dbus returns non posix user uid when uidNumber gidNumber does not exist dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_noposix array:string:uidNumber method return sender=:1.86 -> dest=:1.99 reply_serial=2 array [ dict entry( string "uidNumber" variant array [ string "1196008529" ] ) ] # dbus returns uid and gid or posix user dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_posix array:string:uidNumber method return sender=:1.86 -> dest=:1.98 reply_serial=2 array [ dict entry( string "uidNumber" variant array [ string "1196008528" ] ) ] # config [sssd] domains = appdomain.test, sssdad2012r2.com config_file_version = 2 services = nss, pam, ifp [pam] pam_app_services = sss_test [ifp] user_attributes = +telephoneNumber [application/appdomain.test] inherit_from = sssdad2012r2.com [domain/sssdad2012r2.com] ldap_user_extra_attrs = phone:telephoneNumber ad_domain = sssdad2012r2.com krb5_realm = SSSDAD2012R2.COM realmd_tags = manages-system joined-with-samba cache_credentials = True id_provider = ad krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True use_fully_qualified_names = False fallback_homedir = /home/%u@%d access_provider = ad # ldap entries # sssd noposix, Users, sssdad2012r2.com dn: CN=sssd noposix,CN=Users,DC=sssdad2012r2,DC=com objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user cn: sssd noposix sn: noposix telephoneNumber: 2222222222 givenName: sssd distinguishedName: CN=sssd noposix,CN=Users,DC=sssdad2012r2,DC=com instanceType: 4 whenCreated: 20170601005247.0Z whenChanged: 20170602040647.0Z displayName: sssd noposix uSNCreated: 867705 uSNChanged: 869210 name: sssd noposix objectGUID:: ilSHNVwMYkaWkJ7H3VhXVA== userAccountControl: 66048 badPwdCount: 0 codePage: 0 countryCode: 0 badPasswordTime: 0 lastLogoff: 0 lastLogon: 0 pwdLastSet: 131407519670117907 primaryGroupID: 513 objectSid:: AQUAAAAAAAUVAAAA+GQbCWl28EoQPK3bUSEAAA== accountExpires: 9223372036854775807 logonCount: 0 sAMAccountName: sssd_noposix sAMAccountType: 805306368 userPrincipalName: sssd_noposix@sssdad2012r2.com objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=sssdad2012r2,DC=com dSCorePropagationData: 16010101000000.0Z # sssd posix, Users, sssdad2012r2.com dn: CN=sssd posix,CN=Users,DC=sssdad2012r2,DC=com objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user cn: sssd posix sn: posix telephoneNumber: 1111111111 givenName: sssd distinguishedName: CN=sssd posix,CN=Users,DC=sssdad2012r2,DC=com instanceType: 4 whenCreated: 20170601005223.0Z whenChanged: 20170602040635.0Z displayName: sssd posix uSNCreated: 867694 uSNChanged: 869209 name: sssd posix objectGUID:: +Wb0NLbJqEikSvWvHaDu/w== userAccountControl: 66048 badPwdCount: 0 codePage: 0 countryCode: 0 badPasswordTime: 0 lastLogoff: 0 lastLogon: 0 pwdLastSet: 131407519433398894 primaryGroupID: 513 objectSid:: AQUAAAAAAAUVAAAA+GQbCWl28EoQPK3bUCEAAA== accountExpires: 9223372036854775807 logonCount: 0 sAMAccountName: sssd_posix sAMAccountType: 805306368 userPrincipalName: sssd_posix@sssdad2012r2.com objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=sssdad2012r2,DC=com dSCorePropagationData: 16010101000000.0Z unixUserPassword: ABCD!efgh12345$67890 uid: sssd_posix msSFU30Name: sssd_posix msSFU30NisDomain: sssdad2012r2 uidNumber: 10000 gidNumber: 10000 unixHomeDirectory: /home/sssd_posix loginShell: /bin/sh
Dan, you need to disable ID mapping: ldap_id_mapping = False otherwise sssd will be able to generate UID/GID from SID. Then you should be able to resolve "sssd posix@sssdad2012r2.com" but *NOT* "sssd noposix@sssdad2012r2.com". You should be able to resolve both using "appdomain.test" But you cannot use glibc interface (getent passwd) because "sssd noposix@sssdad2012r2.com" does not have UID. So you need to test with dbus interface here. You will get phoneNumber and uidNumber for "sssd posix@appdomain.test" but only telephoneNumber for "sssd noposix@appdomain.test"
Lukas, Thanks for the clarification, marking this as verified. [root@hp-dl380pgen8-02-vm-10 ~]# id sssd_noposix id: sssd_noposix: no such user [root@hp-dl380pgen8-02-vm-10 ~]# id sssd_posix uid=10000(sssd_posix) gid=10000(sssd_users) groups=10000(sssd_users) # both returns phone numbers [root@hp-dl380pgen8-02-vm-10 ~]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_posix array:string:telephoneNumber method return sender=:1.124 -> dest=:1.125 reply_serial=2 array [ dict entry( string "telephoneNumber" variant array [ string "1111111111" ] ) ] [root@hp-dl380pgen8-02-vm-10 ~]# dbus-send --print-reply --system --dest=org.freedesktop.sssd.infopipe /org/freedesktop/sssd/infopipe org.freedesktop.sssd.infopipe.GetUserAttr string:sssd_noposix array:string:telephoneNumber method return sender=:1.128 -> dest=:1.127 reply_serial=2 array [ dict entry( string "telephoneNumber" variant array [ string "2222222222" ] ) ]
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, 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/RHEA-2017:2294