Bug 688892

Summary: Wrong statement regarding UID allocation in useradd(8)
Product: Red Hat Enterprise Linux 5 Reporter: Pierre Carrier <prc>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: jwest, mmalik, philipdurbin, rdassen, tmraz
Target Milestone: rcKeywords: Documentation, EasyFix
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:16:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
fix none

Description Pierre Carrier 2011-03-18 11:59:56 UTC
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 Program Management 2011-05-31 14:52:27 UTC
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 12:26:21 UTC
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 06:16:53 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.

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