Bug 749253 - nfs-utils does not change nfsnobody's primary group when the package is upgraded on 64Bit
Summary: nfs-utils does not change nfsnobody's primary group when the package is upgra...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils
Version: 5.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
: 746948 (view as bug list)
Depends On:
Blocks: 807971
TreeView+ depends on / blocked
 
Reported: 2011-10-26 15:03 UTC by monte_olvera
Modified: 2018-11-27 21:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-17 18:38:06 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 25301 0 None None None Never

Description monte_olvera 2011-10-26 15:03:08 UTC
Description of problem:

nfs-utils (1.0.9-54) does not change nfsnobody's primary group from 4294967294 to 65534 when the package is upgraded on 64Bit rhel 4/5.  It changes the /etc/group entry to 65534 but does not change the user's gid in /etc/passwd.

After an upgrade to nfs-utils-1.0.9-54:
# grep nfsnobody /etc/passwd /etc/group
/etc/passwd:nfsnobody:x:65534:4294967294:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
/etc/group:nfsnobody:x:65534:


From the scripts being run in the rpm:
#rpm -qa --scripts nfs-utils
... <snip>
# Using the 16-bit value of -2 for the nfsnobody uid and gid

# Create nfsnobody gid as long as it does not already exist.
cat /etc/group | cut -d':' -f 1 | grep --quiet nfsnobody 2>/dev/null
if [ "$?" -eq 1 ]; then
    /usr/sbin/groupadd -g 65534 nfsnobody 2>/dev/null || :
else
    /usr/sbin/groupmod -g 65534 nfsnobody 2>/dev/null || :
fi

# Create nfsnobody uid as long as it does not already exist.
cat /etc/passwd | cut -d':' -f 1 | grep --quiet nfsnobody 2>/dev/null
if [ "$?" -eq 1 ]; then
        /usr/sbin/useradd -l -c "Anonymous NFS User" -r -g 65534 \
                -s /sbin/nologin -u 65534 -d /var/lib/nfs nfsnobody 2>/dev/null || :
else
        /usr/sbin/usermod -u 65534 nfsnobody 2>/dev/null || :
fi
... <snip>



This correction should be made:
    /usr/sbin/usermod -u 65534 nfsnobody 2>/dev/null || :
should be changed to this
    /usr/sbin/usermod -u 65534 -g 65534 nfsnobody 2>/dev/null || :


Version-Release number of selected component (if applicable):
  on rhel 4 and 5 64Bit architectures

How reproducible:
  every time

Steps to Reproduce:
1.  Have a previous version (any prior to 1.0.9-54?) of nfs-utils installed on
    64Bit rhel 4/5 
2.  Upgrade nfs-utils
  
Actual results:
# grep nfsnobody /etc/passwd /etc/group
/etc/passwd:nfsnobody:x:65534:4294967294:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
/etc/group:nfsnobody:x:65534:

Expected results:
# grep nfsnobody /etc/passwd /etc/group
/etc/passwd:nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
/etc/group:nfsnobody:x:65534:


Additional info:
will provide if requested.

Comment 1 Steve Dickson 2011-12-08 15:01:26 UTC
This looks similar to this 
https://bugzilla.redhat.com/show_bug.cgi?id=746948

Comment 2 Steve Dickson 2011-12-09 13:24:09 UTC
*** Bug 746948 has been marked as a duplicate of this bug. ***

Comment 6 Steve Dickson 2012-03-09 20:48:13 UTC
I believe this was fixed by 
    https://bugzilla.redhat.com/show_bug.cgi?id=710020

Try using the -60 nfs-utils

Comment 7 RHEL Program Management 2012-04-02 10:24:04 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.


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