Bug 747297 - useradd -d fails to create user with non-existent directory
Summary: useradd -d fails to create user with non-existent directory
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-19 12:32 UTC by Marcela Mašláňová
Modified: 2011-11-10 13:42 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-11-10 13:42:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marcela Mašláňová 2011-10-19 12:32:15 UTC
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):
shadow-utils-4.1.4.3-7.fc16.x86_64

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 13:42:10 UTC
I can't reproduce it any more.


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