Bug 508199 - newusers will fail with an uninformative message if the new user's parent directory does not exist
Summary: newusers will fail with an uninformative message if the new user's parent dir...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: shadow-utils
Version: 4.8
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Peter Vrabec
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-26 02:29 UTC by Michael Kearey
Modified: 2018-10-27 14:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-18 15:20:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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