Bug 199027

Summary: Misleading error message on unknown user.
Product: [Fedora] Fedora Reporter: Ralph Loader <suckfish>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: meyering
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-17 08:36:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ralph Loader 2006-07-16 00:36:27 UTC
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 07:04:55 UTC
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.nz in https://bugzilla.redhat.com/bugzilla/199027.