Bug 199027 - Misleading error message on unknown user.
Misleading error message on unknown user.
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-15 20:36 EDT by Ralph Loader
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-17 04:36:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralph Loader 2006-07-15 20:36:27 EDT
Description of problem:

chown can give a misleading and irrelevant error message if a non-existant user
id is given.

Version-Release number of selected component (if applicable):

coreutils-5.97-4

How reproducible:

Everytime.

Steps to Reproduce:
1.

# chown sapoqwegfj /dev/ttyS1 
chown: `sapoqwegfj': invalid user

2.

~# chown sapoqwegfj: /dev/ttyS1 
chown: `sapoqwegfj:': cannot get the login group of a numeric UID
  
Actual results:

The second error message "cannot get the login group of a numeric UID" does not
indicate the actual problem.

Expected results:

The second error message be identical to the first, or at least should indicate
that the given user name does not exist.


Additional info:
Comment 1 Jim Meyering 2006-07-16 03:04:55 EDT
Thanks for the report.
I've just fixed this upstream.  Here's the ChangeLog entry:

* userspec.c (parse_with_separator): Say "invalid spec" rather than
the sometimes erroneous "cannot get the login group of a numeric UID"
for a spec like "not-a-username:" or "1:".  Reported by
suckfish@ihug.co.nz in https://bugzilla.redhat.com/bugzilla/199027.

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