Bug 508199

Summary: newusers will fail with an uninformative message if the new user's parent directory does not exist
Product: Red Hat Enterprise Linux 4 Reporter: Michael Kearey <mkearey>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED WONTFIX QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 4.8CC: jwest, rbinkhor, tao
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-18 15:20: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:

Description Michael Kearey 2009-06-26 02:29:24 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 /usr/sbin/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