Bug 199027 - Misleading error message on unknown user.
Summary: Misleading error message on unknown user.
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-16 00:36 UTC by Ralph Loader
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2006-07-17 08:36:08 UTC


Attachments (Terms of Use)

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@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.