-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get session id/info if user name was typed in wrong case #7818
Comments
Hi, thank you for the report. I think this is something which can be handled by SSSD's PAM module. When starting the authentication and authorization process a login application like lightdm will provide the user name you entered at the related prompt. This name is send by SSSD's PAM module to the SSSD's processes and depending on the configured backend a given user can use more than one name to log in. This might be and email address a Kerberos principal or just the name in a different case. This is not only internal but SSSD's NSS handling does that same, i.e. an application can call What pam_sss can do is to check if the current user name known to PAM is the same as the canonical name of the user after successful authentication and if not replace it with the canonical name so that other PAM modules can now directly use the canonical name. pam_sss is currently doing this only in cases where there is no user name at all known to PAM which might happen during Smartcard authentication. bye, |
Thank you for your response and hint! So, I did this in my pam module: auto pw = getpwnam(passed_username);
if (pw)
pam_set_item(pam_handle, PAM_USER, &pw->pw_name); and it fix the problem) Will you do something like that in new version's of pam_unix? |
Hi, it will be bye, |
Environment:
OS: Ubuntu 24.04 + (service systemd-userdb is running)
SSSD: 2.9.4
Domains: tested on ad and freeipa
sssd config:
I have a user
[email protected]
. If I try to login by user[email protected]
-- everything is ok and if I try to get info about user session -- everything is works:But if I try to login by user
[email protected]
-- I still can authenticate successfully, but couldn't get session info:on some OSs it could be:
Also, the problem could be reproduced id set
use_fully_qualified_names=False
and try to auth with fully qualified name:[email protected]
I looked at log and found out that problem is caused by systemd-userdb:
So,
pam_systemd
is failed but, because it's marked as optional module -- this fail doesn't stop authentication.If you stop the service
systemd-userdb
(before authentication), the commandloginctl session-status
starts to workSo, my questions
case_sensitive
option -- I still can auth. Also I found out that I couldn't case starts to matter is setuse_fully_qualified_names=False
andcase_sensitive=True
, but I can't setuse_fully_qualified_names=False
andcase_sensitive=True
(it doesn't work for AD) in my scenarios. It's a bug?pam_systemd
andpam_sss
marked as optional? I saw a lot of distros. they are marked as optional everywhere.userdbctl user $USERNAME@DOMAIN_NAME
, to check that user could be found by systemd-userdbIf conclude everything. I think that there are this bugs:
use_fully_qualified_names=True
set, thancase_sensitive=True
option is ignoreduse_fully_qualified_names=False
option is set. It's consequence of the fact that we can't setcase_sensitive=True
for AD domains.use_fully_qualified_names=False
is set). It's looks likesystemd-userdb
problem, but I still want to inform you about it. Should I create a bug insystemd-userdb
for it?The text was updated successfully, but these errors were encountered: