Bug 688892 - Wrong statement regarding UID allocation in useradd(8)
Summary: Wrong statement regarding UID allocation in useradd(8)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-18 11:59 UTC by Pierre Carrier
Modified: 2018-11-14 13:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 06:16:53 UTC
Target Upstream Version:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 715214 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHBA-2012:0244 0 normal SHIPPED_LIVE shadow-utils bug fix update 2012-02-20 15:07:21 UTC

Internal Links: 715214

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


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