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 - Oddjob-mkhomedir fails when using NSS compat
Summary: Oddjob-mkhomedir fails when using NSS compat
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Sumit Bose
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira review
Depends On: 1402403 1834816
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-20 11:59 UTC by Alexey Tikhonov
Modified: 2020-11-04 02:09 UTC (History)
15 users (show)

Fixed In Version: sssd-2.3.0-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1402403
Environment:
Last Closed: 2020-11-04 02:05:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5153 0 None closed Oddjob-mkhomedir fails when using NSS compat 2021-02-11 08:38:42 UTC
Red Hat Product Errata RHBA-2020:4569 0 None None None 2020-11-04 02:05:36 UTC

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


Note You need to log in before you can comment on or make changes to this bug.