Bug 2053160
| Summary: | [RHEL-8.7] Missing 'rngd' user's home directory causes command 'pwck' to find a problem on /etc/passwd user's entry | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Juan Gamba <jgamba> | |
| Component: | rng-tools | Assignee: | Vladislav Dronov <vdronov> | |
| Status: | CLOSED ERRATA | QA Contact: | Vilém Maršík <vmarsik> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | --- | CC: | danie.dejager, dbohanno, rvr | |
| Target Milestone: | rc | Keywords: | Triaged, ZStream | |
| Target Release: | 8.7 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2077035 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-08 10:47:11 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: | ||||
| Bug Blocks: | 2077035 | |||
hello, Juan, thank you for reporting this. i'll change the workdir for rngd to /, as most of system accounts have. unfortunately, this change will happen in RHEL-8.7 at earliest. i can make a hotfix/test build with the fix for RHEL-8.5 or -8.6 if needed. Hello Vladis, thank you. There is no need for a hotfix/test build, customer will wait the fix from standard channels. The workaround I offered was to actually create the missing directory. hi, Juan, unfortunately, there are hidden complications with creating a dedicated home dir for rngd, so i've took a path of changing rngd's workdir to /. in case your customer needs them, here are the candidate (test) builds (include update to rng-tools v6.14 @b2b7934e + udevadm fix + pwck fix): 8.4.z test build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43282798 8.5.z test build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=43282811 for builds and a testing plan please see bz2075974#c2 and below. these 2 bzs are fixed in the same rng-tools release. The problematic script code seems to be removed, no errors on my test system. # rpm -q --scripts http://download.eng.brq.redhat.com/brewroot/packages/rng-tools/6.15/1.el8/x86_64/rng-tools-6.15-1.el8.x86_64.rpm postinstall scriptlet (using /bin/sh): if [ $1 -eq 1 ] ; then # Initial installation systemctl --no-reload preset rngd.service &>/dev/null || : fi No errors, same package version as already reviewed in Comment #7. Setting verified. # pwck -r # rpm -q rng-tools rng-tools-6.15-1.el8.x86_64 Historically this path was also not found on RHEL 7. Should the '/var/lib/rngd' path be manually created and how does it impact the function of rngd if the path is not there. Was its creation omitted for security reasons? (In reply to Danie de Jager from comment #13) > Should the '/var/lib/rngd' path be manually created no, it should not. > and how does it impact the function of rngd if the path is not there. this does not impact rngd > Was its creation omitted for security reasons? no, it was omitted following Occam's razor principle. HTH! 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 (rng-tools 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-2022:7710 |
Description of problem: Missing 'rngd' user's home directory causes command 'pwck' to find a problem on /etc/passwd user's entry Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Login as root 2. Run command 'pwck -r' 3. Actual results: # pwck -r [..] user 'rngd': directory '/var/lib/rngd' does not exist pwck: no changes Expected results: # pwck -r # Additional info: The rpm script is creating the user (if it does not exist already) with no create home option, 'man 8 adduser', [..] -M, --no-create-home Do no create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes. [..] # rpm -q --scripts rng-tools preinstall scriptlet (using /bin/sh): getent passwd rngd >/dev/null || useradd -r -M -d /var/lib/rngd -s /sbin/nologin -c "Random Number Generator Daemon" rngd postinstall scriptlet (using /bin/sh): if [ $1 -eq 1 ] ; then # Initial installation systemctl --no-reload preset rngd.service rngd-wake-threshold.service &>/dev/null || : fi /usr/bin/systemctl start rngd-wake-threshold.service || : preuninstall scriptlet (using /bin/sh): if [ $1 -eq 0 ] ; then # Package removal, not upgrade systemctl --no-reload disable --now rngd.service rngd-wake-threshold.service &>/dev/null || : fi postuninstall scriptlet (using /bin/sh): if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall systemctl try-restart rngd.service rngd-wake-threshold.service &>/dev/null || : fi