Bug 747297 - useradd -d fails to create user with non-existent directory
useradd -d fails to create user with non-existent directory
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-10-19 08:32 EDT by Marcela Mašláňová
Modified: 2011-11-10 08:42 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-10 08:42:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marcela Mašláňová 2011-10-19 08:32:15 EDT
Description of problem:
If directory used with -d option doesn't exist or can't be created, the user is not created. According to the documentation it should work.

Version-Release number of selected component (if applicable):

How reproducible:
useradd -d /nonexisting_dir/nonexisting_dir2 user

Steps to Reproduce:
1. useradd -d /nonexisting_dir/nonexisting_dir2 user
2. Output will be:
useradd: cannot create directory /nonexisting_dir/nonexisting_dir2
3. user is not created
Actual results:

Expected results:
User will be created:
-d, --home HOME_DIR
The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing.

Additional info:
This was working in RHEL-5.
Comment 1 Marcela Mašláňová 2011-11-10 08:42:10 EST
I can't reproduce it any more.

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