Bug 1677005
| Summary: | Clarify the useradd -d parameter behavior in man page in regards to the creating/not creating the home dir | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Thomas Walker Lynch <thomas.walker.lynch> |
| Component: | shadow-utils | Assignee: | Iker Pedrosa <ipedrosa> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 31 | CC: | jhrozek, ppywlkiqletw, pvrabec, tmraz |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | sync-to-jira | ||
| Fixed In Version: | shadow-utils-4.8.1-2.fc32 shadow-utils-4.6-18.fc31 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-01 00:18:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Thomas Walker Lynch
2019-02-13 18:33:14 UTC
Did you mean to file this bug against libuser? useradd comes from shadow-utils.. thanks I was initially on the fence about that .. should know better, I've forked shadow locally to look at it .. By default there is CREATE_HOME yes in /etc/login.defs which overrides what is specified in the manpage for -d. Please see the -m and -M options to override it. Hold on a sec. Options that are effected by the login.defs are explicitly marked as such on the man page. Note, -g and -U options. This leaves the reading that The CREATE_HOME variable in login defs affects only the default behavior, not when explicitly specified as it states for the -d option. Indeed the man page says: "CREATE HOME ... if a home directory should be created by default ..." as quoted above, -d option gives explicit no create behavior. If the man page is incorrect, like how could anyone know that? If that is the case I'll flip it over to those guys. BTW, I did bring this up in an issue on the shadow github, but no one commented on it. So like other people, I'm left with the man page for documentation. The manpage is what should be clarified. Tomas, am I to understand that there is no way to invoke useradd on Fedora without having a user directory created and populated? (In reply to Thomas Walker Lynch from comment #6) > Tomas, am I to understand that there is no way to invoke useradd on Fedora > without having a user directory created and populated? excuse me, -M works for this and is working in combination with -d. So the unqualified clause in the -d option, that the directory will not be created, is what needs clarification Yes. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'. This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31. * master
d60b59b156a576293986a4ccf182db09e3386236 - useradd: clarify the useradd -d parameter behavior in man page
FEDORA-2020-4ece7634c3 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4ece7634c3 FEDORA-2020-4ece7634c3 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4ece7634c3` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4ece7634c3 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-fec3968448 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-fec3968448 FEDORA-2020-4ece7634c3 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-fec3968448 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-fec3968448` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-fec3968448 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-4ece7634c3 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-fec3968448 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report. This is not 100% correct
-d, --home-dir 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. If the
directory HOME_DIR does not exist, then it will be created unless the -M option is specified.
The home directory will be created if the -m option is set or CREATE_HOME is set to true in /etc/login.defs.
Using the -M option prevents creating the directory regardless of the value of CREATE_HOME.
|