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 1321279 - An existing 'rpc' user is removed during the installation of rpcbind without any messages
Summary: An existing 'rpc' user is removed during the installation of rpcbind without ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpcbind
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On: 1300533
Blocks: 1301288
TreeView+ depends on / blocked
 
Reported: 2016-03-25 07:29 UTC by Masahiro Matsuya
Modified: 2020-02-14 17:43 UTC (History)
4 users (show)

Fixed In Version: rpcbind-0.2.0-35.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1300533
Environment:
Last Closed: 2016-11-04 02:10:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2274 0 normal SHIPPED_LIVE rpcbind bug fix and enhancement update 2016-11-03 13:35:05 UTC

Description Masahiro Matsuya 2016-03-25 07:29:07 UTC
+++ This bug was initially created as a clone of Bug #1300533 +++

Description of problem:

A customer had a 'rpc' user (not UID=32) on the system, but the existing 'rpc' user was deleted by the installation of rpcbind package without any message.

We found a fedora documentation about packaging, and it says that any user account should not be deleted during the package installation.

https://fedoraproject.org/wiki/Packaging:UsersAndGroups?rd=Packaging/UsersAndGroups

In rpcbind.spec:
----------------------------------
%pre

# Check the validity of the rpc uid and gid.
# If they don't exist, create them
# If they exist but are the wrong value, remove them 
#   and recreate them with the correct value
# If they exist and are the correct value do nothing
rpcid=`getent passwd rpc | cut -d: -f 3`
if [ -n "$rpcid" -a "$rpcid" != "32" ]; then
        /usr/sbin/userdel  rpc 2> /dev/null || :
        /usr/sbin/groupdel rpc 2> /dev/null || :
fi
if [ -z "$rpcid" -o "$rpcid" != "32" ]; then
        /usr/sbin/groupadd -o -g 32 rpc > /dev/null 2>&1
        /usr/sbin/useradd -o -l -c "Rpcbind Daemon" -d /var/cache/rpcbind -g 32 \
        -M -s /sbin/nologin -u 32 rpc > /dev/null 2>&1
fi
----------------------------------

It forces to have the 'rpc' account with UID=32. If the UID is not 32, it removes it and create another 'rpc' account with UID=32.

If the above fedora documentation is correct, it should not remove the existing 'rpc' account during the installation. 

As an example of another package, 'httpd' also creates a user account 'apache'.
But, if the user account 'apache' exists, it never remove the existing account.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 6

--- Additional comment from Masahiro Matsuya on 2016-03-25 03:18:34 EDT ---

6.8 is on testing phase. Moved to 6.9.

Comment 2 Steve Dickson 2016-04-04 20:50:04 UTC
Fedora commit:

commit 058b1d088d77db67344db42c521be53c23e96c46
Author: Steve Dickson <steved>
Date:   Mon Apr 4 12:07:52 2016 -0400

    Softly allocate rpc uid/gid (bz 1301288)

Comment 6 Yongcheng Yang 2016-06-14 10:58:14 UTC
Move to VERIFIED as comment 5, and continue to run the automatic case.

Comment 8 errata-xmlrpc 2016-11-04 02:10:28 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, 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://rhn.redhat.com/errata/RHBA-2016-2274.html


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