Bug 461455

Summary: newusers will fail with an uninformative message if the new user's parent directory does not exist
Product: Red Hat Enterprise Linux 5 Reporter: Michael Kearey <mkearey>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: dmair, jplans, mmalik, pdwyer, sgrubb, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 586330 (view as bug list) Environment:
Last Closed: 2010-03-30 08:13:22 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:
Bug Depends On:    
Bug Blocks: 499522, 586330    
Attachments:
Description Flags
patch to resolve newusers error message
none
Patch to add error message and change man pages none

Description Michael Kearey 2008-09-08 07:16:41 UTC
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 07:46:00 UTC
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 06:29:59 UTC
Created attachment 317339 [details]
Patch to add error message and change man pages

Comment 4 RHEL Program Management 2009-03-26 17:13:50 UTC
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 08:13:22 UTC
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