Skip to content

Confusing phrasing in useradd manpage for --home-dir flag #1522

@septatrix

Description

@septatrix

It states

The directory HOME_DIR is not created by default. However it will be created for non-system users if either the -m flag is specifed or CREATE_HOME in login.defs is set to true. However, it will never be created if the -M flag is specified.

However, --system states

Note that useradd will not create a home directory for such a user, regardless of the default setting in /etc/login.defs (CREATE_HOME). You have to specify the -m options if you want a home directory for a system account to be created.

This is also what actually happens. A more clear phrasing would be to rearrange the "for non-system users":

However it will be created if either the -m flag is specifed or (for non-system users) CREATE_HOME in login.defs is set to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions