Red Hat Bugzilla – Bug 747297
useradd -d fails to create user with non-existent directory
Last modified: 2011-11-10 08:42:10 EST
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):
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
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.
This was working in RHEL-5.
I can't reproduce it any more.