Open mastersin opened 3 years ago
Hi @sidecontrol,
could you please try to re-produce it?
This looks at least like inconsistent behavior. We could provide %d/%D to allow explicit conversion.
Ok. I will try first on the available versions, on the updated ones.
It's because the name in the domain section is capitalized.
[sssd]
domains = domain-2lc7.com
config_file_version = 2
services = nss, pam
[domain/domain-2lc7.com] <<<<<<<<<<<<<<< HERE
default_shell = /bin/bash
krb5_store_password_if_offline = True
cache_credentials = True
krb5_realm = DOMAIN-2LC7.COM
realmd_tags = manages-system joined-with-adcli
id_provider = ad
fallback_homedir = /home/%d/%u
ad_domain = domain-2lc7.com
use_fully_qualified_names = True
ldap_id_mapping = True
access_provider = ad
krb5_use_subdomain_realm = true
[root@client033 ~]# getent passwd -s sss CHILD-2LC7.DOMAIN-2LC7.COM\\administrator
administrator@child-2lc7.domain-2lc7.com:*:1402600500:1402600500:Administrator:/home/child-2lc7.domain-2lc7.com/administrator:/bin/bash
[root@client033 ~]# getent passwd -s sss DOMAIN-2LC7.COM\\administrator
administrator@domain-2lc7.com:*:406800500:406800513:Administrator:/home/domain-2lc7.com/administrator:/bin/bash
=============================================
[sssd]
domains = domain-2lc7.com
config_file_version = 2
services = nss, pam
[domain/DOMAIN-2LC7.COM]
default_shell = /bin/bash
krb5_store_password_if_offline = True
cache_credentials = True
krb5_realm = DOMAIN-2LC7.COM
realmd_tags = manages-system joined-with-adcli
id_provider = ad
fallback_homedir = /home/%d/%u
ad_domain = domain-2lc7.com
use_fully_qualified_names = True
ldap_id_mapping = True
access_provider = ad
krb5_use_subdomain_realm = true
[root@client033 ~]# getent passwd -s sss DOMAIN-2LC7.COM\\administrator
administrator@DOMAIN-2LC7.COM:*:406800500:406800513:Administrator:/home/DOMAIN-2LC7.COM/administrator:/bin/bash
[root@client033 ~]# getent passwd -s sss CHILD-2LC7.DOMAIN-2LC7.COM\\administrator
administrator@child-2lc7.domain-2lc7.com:*:1402600500:1402600500:Administrator:/home/child-2lc7.domain-2lc7.com/administrator:/bin/bash
sssd-2.9.1-2.el9.x86_64
Default domain substitution in fallback_homedir is set by "%d". For parent domain it substitutes as REALM in uppercase, but for subdomain in sssd-ad, it on the contrary substitutes as domain name in lowercase. It looks like this is a bug as we doesn't get the same behavior for the same parameter.
For example, for administrator in parent domain we got /home/DOMAIN.ALT/administrator, but for administrator in subdomain - /home/domain2.alt/administrator.