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 1886433 - oddjob-mkhomedir - homedir has a wrong permissions
Summary: oddjob-mkhomedir - homedir has a wrong permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: oddjob
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Alexander Bokovoy
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On: 1886362
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-08 12:48 UTC by Alexander Bokovoy
Modified: 2023-02-16 08:13 UTC (History)
10 users (show)

Fixed In Version: oddjob-0.34.5-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1886362
Environment:
Last Closed: 2021-05-18 15:21:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9461 0 None None None 2023-02-16 07:54:27 UTC

Comment 7 Sudhir Menon 2020-11-02 09:56:41 UTC
Beaker job has passed using RHEL8.4: https://beaker.engineering.redhat.com/jobs/4698153.
Hence marking the bug as verified.

Installed     : oddjob-0.34.5-4.el8.x86_64

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test description
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

PURPOSE of /CoreOS/oddjob/Sanity/oddjob-mkhomedir-sanity-test
Description: Test if oddjob-mkhomedir can create correct home directories
Author: Patrik Kis <pkis>
Bug summary: oddjob-mkhomedir fails mkdir: cannot create directory Permission denied
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1098616

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Setup
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 13:26:31 ] :: [   PASS   ] :: Checking for the presence of oddjob rpm 
:: [ 13:26:31 ] :: [   LOG    ] :: Package versions:
:: [ 13:26:31 ] :: [   LOG    ] ::   oddjob-0.34.5-4.el8.x86_64
:: [ 13:26:31 ] :: [   PASS   ] :: Checking for the presence of oddjob-mkhomedir rpm 
:: [ 13:26:31 ] :: [   LOG    ] :: Package versions:
:: [ 13:26:31 ] :: [   LOG    ] ::   oddjob-mkhomedir-0.34.5-4.el8.x86_64
:: [ 13:26:31 ] :: [   PASS   ] :: Checking for the presence of nscd rpm 
:: [ 13:26:31 ] :: [   LOG    ] :: Package versions:
:: [ 13:26:31 ] :: [   LOG    ] ::   nscd-2.28-132.el8.x86_64
:: [ 13:26:31 ] :: [   PASS   ] :: Creating tmp directory (Expected 0, got 0)
:: [ 13:26:31 ] :: [   PASS   ] :: Command 'pushd /tmp/tmp.TwLZw8u2Cq' (Expected 0, got 0)
:: [ 13:26:31 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-117212066/backup' as backup destination
:: [ 13:26:31 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-117212066/backup' as backup destination
:: [ 13:26:32 ] :: [   PASS   ] :: Command 'useradd -M alice' (Expected 0, got 0)
:: [ 13:26:32 ] :: [   PASS   ] :: Command 'authselect select sssd with-mkhomedir --backup=BACKUP --force' (Expected 0, got 0)
:: [ 13:26:32 ] :: [   PASS   ] :: Command 'grep oddjob /etc/pam.d/*' (Expected 0, got 0)
:: [ 13:26:32 ] :: [   INFO   ] :: using '/var/tmp/beakerlib-117212066/backup' as backup destination
:: [ 13:26:32 ] :: [   PASS   ] :: Command 'sed -i 's/sss//g' /etc/nsswitch.conf' (Expected 0, got 0)
:: [ 13:26:33 ] :: [   LOG    ] :: rlServiceStart: Service oddjobd started successfully
:: [ 13:26:33 ] :: [   LOG    ] :: rlServiceStart: Service nscd started successfully
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 2s
::   Assertions: 9 good, 0 bad
::   RESULT: PASS (Setup)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Home directory creation for remote user
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 13:26:37 ] :: [   PASS   ] :: File /home/alice should not exist 
:: [ 13:26:37 ] :: [   PASS   ] :: Command 'su -c pwd - alice &>login.log' (Expected 0, got 0)
:: [ 13:26:37 ] :: [   PASS   ] :: File 'login.log' should contain '^/home/alice$' 
:: [ 13:26:37 ] :: [   PASS   ] :: File 'login.log' should not contain 'No such file or directory' 
:: [ 13:26:37 ] :: [   PASS   ] :: Directory /home/alice should exist 
:: [ 13:26:37 ] :: [   PASS   ] :: User and group owner check (Assert: 'root:root' should equal 'root:root')
:: [ 13:26:37 ] :: [   PASS   ] :: Access rights check (Assert: '755' should equal '755')
:: [ 13:26:37 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:37 ] :: [   PASS   ] :: Selinux security context check: /home (Assert: 'system_u:object_r:home_root_t:s0' should equal 'system_u:object_r:home_root_t:s0')
:: [ 13:26:37 ] :: [   PASS   ] :: User and group owner check (Assert: 'alice:alice' should equal 'alice:alice')
:: [ 13:26:37 ] :: [   PASS   ] :: Access rights check (Assert: '700' should equal '700')
:: [ 13:26:37 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:37 ] :: [   PASS   ] :: Selinux security context check: /home/alice (Assert: 'unconfined_u:object_r:user_home_dir_t:s0' should equal 'unconfined_u:object_r:user_home_dir_t:s0')
:: [ 13:26:37 ] :: [   PASS   ] :: Command 'rm -rf /home/alice/' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Assertions: 14 good, 0 bad
::   RESULT: PASS (Home directory creation for remote user)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Home directory creation for remote user in a non standard location
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 13:26:42 ] :: [   PASS   ] :: Command 'usermod --home /home/oddjobtest/aaa/bbb alice' (Expected 0, got 0)
:: [ 13:26:43 ] :: [   PASS   ] :: File /home/oddjobtest/aaa/bbb should not exist 
:: [ 13:26:43 ] :: [   PASS   ] :: Command 'su -c pwd - alice &>login.log' (Expected 0, got 0)
:: [ 13:26:43 ] :: [   PASS   ] :: File 'login.log' should contain '^/home/oddjobtest/aaa/bbb$' 
:: [ 13:26:43 ] :: [   PASS   ] :: File 'login.log' should not contain 'No such file or directory' 
:: [ 13:26:43 ] :: [   PASS   ] :: Directory /home/oddjobtest/aaa/bbb should exist 
:: [ 13:26:43 ] :: [   PASS   ] :: User and group owner check (Assert: 'root:root' should equal 'root:root')
:: [ 13:26:43 ] :: [   PASS   ] :: Access rights check (Assert: '755' should equal '755')
:: [ 13:26:43 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:43 ] :: [   PASS   ] :: Selinux security context check: /home (Assert: 'system_u:object_r:home_root_t:s0' should equal 'system_u:object_r:home_root_t:s0')
:: [ 13:26:43 ] :: [   PASS   ] :: User and group owner check (Assert: 'root:root' should equal 'root:root')
:: [ 13:26:43 ] :: [   PASS   ] :: Access rights check (Assert: '711' should equal '711')
:: [ 13:26:43 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:43 ] :: [   PASS   ] :: Selinux security context check: /home/oddjobtest (Assert: 'unconfined_u:object_r:user_home_dir_t:s0' should equal 'unconfined_u:object_r:user_home_dir_t:s0')
:: [ 13:26:43 ] :: [   PASS   ] :: User and group owner check (Assert: 'root:root' should equal 'root:root')
:: [ 13:26:43 ] :: [   PASS   ] :: Access rights check (Assert: '711' should equal '711')
:: [ 13:26:43 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:43 ] :: [   PASS   ] :: Selinux security context check: /home/oddjobtest/aaa (Assert: 'unconfined_u:object_r:user_home_t:s0' should equal 'unconfined_u:object_r:user_home_t:s0')
:: [ 13:26:43 ] :: [   PASS   ] :: User and group owner check (Assert: 'alice:alice' should equal 'alice:alice')
:: [ 13:26:43 ] :: [   PASS   ] :: Access rights check (Assert: '700' should equal '700')
:: [ 13:26:43 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:43 ] :: [   PASS   ] :: Selinux security context check: /home/oddjobtest/aaa/bbb (Assert: 'unconfined_u:object_r:user_home_t:s0' should equal 'unconfined_u:object_r:user_home_t:s0')
:: [ 13:26:44 ] :: [   PASS   ] :: Command 'usermod --home /home/alice alice' (Expected 0, got 0)
:: [ 13:26:44 ] :: [   PASS   ] :: Command 'rm -rf /home/oddjobtest' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 3s
::   Assertions: 24 good, 0 bad
::   RESULT: PASS (Home directory creation for remote user in a non standard location)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Home directory creation for local user
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 13:26:48 ] :: [   PASS   ] :: Command 'service nscd stop' (Expected 0, got 0)
:: [ 13:26:48 ] :: [   PASS   ] :: File /home/alice should not exist 
:: [ 13:26:49 ] :: [   PASS   ] :: Command 'su -c pwd - alice &>login.log' (Expected 0, got 0)
:: [ 13:26:49 ] :: [   PASS   ] :: File 'login.log' should contain '^/home/alice$' 
:: [ 13:26:49 ] :: [   PASS   ] :: File 'login.log' should not contain 'No such file or directory' 
:: [ 13:26:49 ] :: [   PASS   ] :: Directory /home/alice should exist 
:: [ 13:26:49 ] :: [   PASS   ] :: User and group owner check (Assert: 'root:root' should equal 'root:root')
:: [ 13:26:49 ] :: [   PASS   ] :: Access rights check (Assert: '755' should equal '755')
:: [ 13:26:49 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:49 ] :: [   PASS   ] :: Selinux security context check: /home (Assert: 'system_u:object_r:home_root_t:s0' should equal 'system_u:object_r:home_root_t:s0')
:: [ 13:26:49 ] :: [   PASS   ] :: User and group owner check (Assert: 'alice:alice' should equal 'alice:alice')
:: [ 13:26:49 ] :: [   PASS   ] :: Access rights check (Assert: '700' should equal '700')
:: [ 13:26:49 ] :: [   PASS   ] :: File type check (Assert: 'directory' should equal 'directory')
:: [ 13:26:49 ] :: [   PASS   ] :: Selinux security context check: /home/alice (Assert: 'unconfined_u:object_r:user_home_dir_t:s0' should equal 'unconfined_u:object_r:user_home_dir_t:s0')
:: [ 13:26:49 ] :: [   PASS   ] :: Command 'rm -rf /home/alice/' (Expected 0, got 0)
:: [ 13:26:49 ] :: [   PASS   ] :: Command 'service nscd start' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Comment 9 errata-xmlrpc 2021-05-18 15:21:04 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 (oddjob 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-2021:1759


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