Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1838037

Summary: Oddjob-mkhomedir fails when using NSS compat
Product: Red Hat Enterprise Linux 8 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: atikhono, fweimer, grajaiya, jhrozek, lslebodn, mkosek, mupadhye, mzidek, pbrezina, sbose, sgoveas, sssd-qe, thalman, trondham, tscherf
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira review
Fixed In Version: sssd-2.3.0-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1402403 Environment:
Last Closed: 2020-11-04 02:05:17 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:
Bug Depends On: 1402403, 1834816    
Bug Blocks:    

Comment 2 Pavel Březina 2020-05-21 08:55:08 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/5157

* `master`
    * aac4dbb17f3e19a2fbeefb38b3319827d3bf820e - NSS client: preserve errno during _nss_sss_end* calls

Comment 6 Madhuri 2020-08-07 08:24:47 UTC
[root@ci-vm-10-0-107-1 ~]# rpm -qa sssd glibc oddjob-mkhomedir
oddjob-mkhomedir-0.34.5-2.el8.x86_64
sssd-2.3.0-6.el8.x86_64
glibc-2.28-127.el8.x86_64

Verification steps:

1) pam_mkhomedir is configured (with-mkhomedir option of authselect)
# authselect select sssd with-mkhomedir --force

2) Update /etc/nsswitch.conf

from /etc/nsswitch.conf
passwd_compat: sss
passwd: compat

also added '+' at the end of /etc/passwd

3) Restart sssd

4) Check authentication of user 
[root@ci-vm-10-0-107-1 ~]# ssh -l test_user@ldap localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:+mpAR9YB8Buu8NSb/zHNMgsD3bmQ6MKiJqnKr0V7huc.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
test_user@ldap@localhost's password: 
Activate the web console with: systemctl enable --now cockpit.socket

This system is not registered to Red Hat Insights. See https://cloud.redhat.com/
To register this system, run: insights-client --register

/usr/bin/id: cannot find name for group ID 14583101
[test_user@ldap@ci-vm-10-0-107-1 ~]$ pwd
/home/test_user
[test_user@ldap@ci-vm-10-0-107-1 ~]$ logout
Connection to localhost closed.


5) Check with C program,
[root@ci-vm-10-0-107-1 ~]# cat test.c
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>

int main(int argc, char *argv[])
{
        char buf[4];
        int ret;
        struct passwd pwd;
        struct passwd *pw;

        if (argc != 2) {
                return -1;
        }

        ret = getpwnam_r(argv[1], &pwd, buf, sizeof(buf), &pw);

        printf("ret: %d\n", ret);

        return 0;
}

compile and run the code,

[root@ci-vm-10-0-107-1 ~]# gcc -o test test.c 

[root@ci-vm-10-0-107-1 ~]# ./test dfh
ret: 34

34 is returned and the home directory is created after the first login.
Hence marking this verified.

Comment 9 errata-xmlrpc 2020-11-04 02:05:17 UTC
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 (sssd 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:4569