Bug 461455 - newusers will fail with an uninformative message if the new user's parent directory does not exist
newusers will fail with an uninformative message if the new user's parent dir...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Vrabec
:
Depends On:
Blocks: 499522 586330
  Show dependency treegraph
 
Reported: 2008-09-08 03:16 EDT by Michael Kearey
Modified: 2016-06-10 10:53 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 586330 (view as bug list)
Environment:
Last Closed: 2010-03-30 04:13:22 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)
patch to resolve newusers error message (3.12 KB, patch)
2008-09-08 03:46 EDT, Michael Kearey
no flags Details | Diff
Patch to add error message and change man pages (3.79 KB, patch)
2008-09-22 02:29 EDT, Michael Kearey
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0209 normal SHIPPED_LIVE shadow-utils bug fix update 2010-03-29 08:28:50 EDT

  None (edit)
Description Michael Kearey 2008-09-08 03:16:41 EDT
Description of problem:

If newusers is run to create a batch of new users, and the parent directory(s) do not exist, the command fails with an uninformative message

Also the man page does not make it clear that the user must make sure parent directories exist.


Version-Release number of selected component (if applicable):
shadow-utils-4.0.17-13.el5

How reproducible:
100%

Steps to Reproduce:
1. $ echo 'dumbo:mypasshere:1234:1234::/tmp/no/such/dir/for/dumbo:/bin/false' | sudo newusers

  
Actual results:
$ echo 'dumbo:mypasshere:1234:1234::/tmp/no/such/dir/for/dumbo:/bin/false' | sudo /usr/sbin/newusers
Password:
newusers: line 1: mkdir failed


Expected results:
A more informative message like so :

$ echo 'dumbo:mypasshere:1234:1234::/tmp/no/such/dir/for/dumbo:/bin/false' | sudo /usr/sbin/newusers
Password:
newusers: line 1: mkdir failed - no parent directory

Additional info:

I have a small patch that changes both the man page and the error message
Comment 1 Michael Kearey 2008-09-08 03:46:00 EDT
Created attachment 316050 [details]
patch to resolve newusers error message 

Patch to man page for 'newusers' command.
Patch for newusers command to alter the error returned if parent directory of the new user's home directory does not exist.
Comment 3 Michael Kearey 2008-09-22 02:29:59 EDT
Created attachment 317339 [details]
Patch to add error message and change man pages
Comment 4 RHEL Product and Program Management 2009-03-26 13:13:50 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 11 errata-xmlrpc 2010-03-30 04:13:22 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0209.html

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