Bug 508199 - 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 WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: shadow-utils (Show other bugs)
4.8
All Linux
low Severity medium
: rc
: ---
Assigned To: Peter Vrabec
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-25 22:29 EDT by Michael Kearey
Modified: 2010-10-23 06:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-18 10:20:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Kearey 2009-06-25 22:29:24 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 /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.