Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 688892 - Wrong statement regarding UID allocation in useradd(8)
Wrong statement regarding UID allocation in useradd(8)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Vrabec
Milos Malik
: Documentation, EasyFix
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-18 07:59 EDT by Pierre Carrier
Modified: 2012-02-21 01:16 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 01:16:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix (4.55 KB, patch)
2011-10-14 08:26 EDT, Peter Vrabec
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0244 normal SHIPPED_LIVE shadow-utils bug fix update 2012-02-20 10:07:21 EST

  None (edit)
Description Pierre Carrier 2011-03-18 07:59:56 EDT
Description of problem:
- The useradd(8) manpage states:

--- 8< ---
       -u, --uid UID
          The numerical value of the user’s ID. This value must be unique,
          unless the -o option is used. The value must be non-negative. The
          default is to use the smallest ID value greater than 999 and greater
          than every other user. Values between 0 and 999 are typically
          reserved for system accounts.
--- >8 ---

- The actual default lower bound is:
$ grep UID /etc/login.defs
UID_MIN			  500

- There actually always is a user with a larger UID by default:
$ grep nfsnobody /etc/passwd
nfsnobody:!!:4294967294:4294967294:Anonymous NFS User:/var/lib/nfs:/sbin/nologin

Version-Release number of selected component (if applicable):
All shadow-utils RHEL5 packages

How reproducible:
100%

Steps to Reproduce:
1. Install a new system, or temporarily remove UIDs over 500 from
# getent passwd
2. Create a new user:
$ adduser foo
3. Check its UID
  
Actual results:
# getent passwd foo
foo:...:500:...:...:/home/foo:/bin/bash

Additional info:
- This documentation looks like a specification
- The shadow-utils behaviour should reasonably predictible as it is not unusual to implement security policies based on expectations on the UID (notably through pam_succeed_if.so)
Comment 1 RHEL Product and Program Management 2011-05-31 10:52:27 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 2 Peter Vrabec 2011-10-14 08:26:21 EDT
Created attachment 528197 [details]
fix

Pierre, could you please take a quick look at proposed "fix". I have changed few statements that refer to UID_MIN/UID_MAX/GID_MIN/GID_MAX. thnx.
Comment 5 errata-xmlrpc 2012-02-21 01:16:53 EST
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.

http://rhn.redhat.com/errata/RHBA-2012-0244.html

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