{
    "mode": "man",
    "parameter": "USERADD",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/USERADD/8/json",
    "generated": "2026-05-30T09:07:49Z",
    "synopsis": "useradd [options] LOGIN\nuseradd -D\nuseradd -D [options]",
    "sections": {
        "NAME": {
            "content": "useradd - create a new user or update default new user information\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "useradd [options] LOGIN\n\nuseradd -D\n\nuseradd -D [options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "useradd is a low level utility for adding users. On Debian, administrators should usually use\nadduser(8) instead.\n\nWhen invoked without the -D option, the useradd command creates a new user account using the\nvalues specified on the command line plus the default values from the system. Depending on\ncommand line options, the useradd command will update system files and may also create the\nnew user's home directory and copy initial files.\n\nBy default, a group will also be created for the new user (see -g, -N, -U, and\nUSERGROUPSENAB).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The options which apply to the useradd command are:\n",
            "subsections": [
                {
                    "name": "--badname",
                    "content": "Allow names that do not conform to standards.\n",
                    "long": "--badname"
                },
                {
                    "name": "-b --base-dir",
                    "content": "The default base directory for the system if -d HOMEDIR is not specified.  BASEDIR is\nconcatenated with the account name to define the home directory. If the -m option is not\nused, BASEDIR must exist.\n\nIf this option is not specified, useradd will use the base directory specified by the\nHOME variable in /etc/default/useradd, or /home by default.\n",
                    "flag": "-b",
                    "long": "--base-dir"
                },
                {
                    "name": "-c --comment",
                    "content": "Any text string. It is generally a short description of the login, and is currently used\nas the field for the user's full name.\n",
                    "flag": "-c",
                    "long": "--comment"
                },
                {
                    "name": "-d --home-dir",
                    "content": "The new user will be created using HOMEDIR as the value for the user's login directory.\nThe default is to append the LOGIN name to BASEDIR and use that as the login directory\nname. The directory HOMEDIR does not have to exist but will not be created if it is\nmissing.\n",
                    "flag": "-d",
                    "long": "--home-dir"
                },
                {
                    "name": "-D --defaults",
                    "content": "See below, the subsection \"Changing the default values\".\n",
                    "flag": "-D",
                    "long": "--defaults"
                },
                {
                    "name": "-e --expiredate",
                    "content": "The date on which the user account will be disabled. The date is specified in the format\nYYYY-MM-DD.\n\nIf not specified, useradd will use the default expiry date specified by the EXPIRE\nvariable in /etc/default/useradd, or an empty string (no expiry) by default.\n",
                    "flag": "-e",
                    "long": "--expiredate"
                },
                {
                    "name": "-f --inactive",
                    "content": "The number of days after a password expires until the account is permanently disabled. A\nvalue of 0 disables the account as soon as the password has expired, and a value of -1\ndisables the feature.\n\nIf not specified, useradd will use the default inactivity period specified by the\nINACTIVE variable in /etc/default/useradd, or -1 by default.\n",
                    "flag": "-f",
                    "long": "--inactive"
                },
                {
                    "name": "-g --gid",
                    "content": "The group name or number of the user's initial login group. The group name must exist. A\ngroup number must refer to an already existing group.\n\nIf not specified, the behavior of useradd will depend on the USERGROUPSENAB variable in\n/etc/login.defs. If this variable is set to yes (or -U/--user-group is specified on the\ncommand line), a group will be created for the user, with the same name as her loginname.\nIf the variable is set to no (or -N/--no-user-group is specified on the command line),\nuseradd will set the primary group of the new user to the value specified by the GROUP\nvariable in /etc/default/useradd, or 100 by default.\n",
                    "flag": "-g",
                    "long": "--gid"
                },
                {
                    "name": "-G --groups",
                    "content": "A list of supplementary groups which the user is also a member of. Each group is\nseparated from the next by a comma, with no intervening whitespace. The groups are\nsubject to the same restrictions as the group given with the -g option. The default is\nfor the user to belong only to the initial group.\n",
                    "flag": "-G",
                    "long": "--groups"
                },
                {
                    "name": "-h --help",
                    "content": "Display help message and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-k --skel",
                    "content": "The skeleton directory, which contains files and directories to be copied in the user's\nhome directory, when the home directory is created by useradd.\n\nThis option is only valid if the -m (or --create-home) option is specified.\n\nIf this option is not set, the skeleton directory is defined by the SKEL variable in\n/etc/default/useradd or, by default, /etc/skel.\n\nIf possible, the ACLs and extended attributes are copied.\n",
                    "flag": "-k",
                    "long": "--skel"
                },
                {
                    "name": "-K --key",
                    "content": "Overrides /etc/login.defs defaults (UIDMIN, UIDMAX, UMASK, PASSMAXDAYS and others).\n\nExample: -K PASSMAXDAYS=-1 can be used when creating system account to turn off\npassword aging, even though system account has no password at all. Multiple -K options\ncan be specified, e.g.: -K UIDMIN=100  -K UIDMAX=499\n",
                    "flag": "-K",
                    "long": "--key"
                },
                {
                    "name": "-l --no-log-init",
                    "content": "Do not add the user to the lastlog and faillog databases.\n\nBy default, the user's entries in the lastlog and faillog databases are reset to avoid\nreusing the entry from a previously deleted user.\n\nFor the compatibility with previous Debian's useradd, the -O option is also supported.\n",
                    "flag": "-l",
                    "long": "--no-log-init"
                },
                {
                    "name": "-m --create-home",
                    "content": "Create the user's home directory if it does not exist. The files and directories\ncontained in the skeleton directory (which can be defined with the -k option) will be\ncopied to the home directory.\n\nBy default, if this option is not specified and CREATEHOME is not enabled, no home\ndirectories are created.\n",
                    "flag": "-m",
                    "long": "--create-home"
                },
                {
                    "name": "-M --no-create-home",
                    "content": "Do no create the user's home directory, even if the system wide setting from\n/etc/login.defs (CREATEHOME) is set to yes.\n",
                    "flag": "-M",
                    "long": "--no-create-home"
                },
                {
                    "name": "-N --no-user-group",
                    "content": "Do not create a group with the same name as the user, but add the user to the group\nspecified by the -g option or by the GROUP variable in /etc/default/useradd.\n\nThe default behavior (if the -g, -N, and -U options are not specified) is defined by the\nUSERGROUPSENAB variable in /etc/login.defs.\n",
                    "flag": "-N",
                    "long": "--no-user-group"
                },
                {
                    "name": "-o --non-unique",
                    "content": "Allow the creation of a user account with a duplicate (non-unique) UID.\n\nThis option is only valid in combination with the -u option.\n",
                    "flag": "-o",
                    "long": "--non-unique"
                },
                {
                    "name": "-p --password",
                    "content": "The encrypted password, as returned by crypt(3). The default is to disable the password.\n\nNote: This option is not recommended because the password (or encrypted password) will be\nvisible by users listing the processes.\n\nYou should make sure the password respects the system's password policy.\n",
                    "flag": "-p",
                    "long": "--password"
                },
                {
                    "name": "-r --system",
                    "content": "Create a system account.\n\nSystem users will be created with no aging information in /etc/shadow, and their numeric\nidentifiers are chosen in the SYSUIDMIN-SYSUIDMAX range, defined in /etc/login.defs,\ninstead of UIDMIN-UIDMAX (and their GID counterparts for the creation of groups).\n\nNote that useradd will not create a home directory for such a user, regardless of the\ndefault setting in /etc/login.defs (CREATEHOME). You have to specify the -m options if\nyou want a home directory for a system account to be created.\n",
                    "flag": "-r",
                    "long": "--system"
                },
                {
                    "name": "-R --root",
                    "content": "Apply changes in the CHROOTDIR directory and use the configuration files from the\nCHROOTDIR directory.\n",
                    "flag": "-R",
                    "long": "--root"
                },
                {
                    "name": "-P --prefix",
                    "content": "Apply changes in the PREFIXDIR directory and use the configuration files from the\nPREFIXDIR directory. This option does not chroot and is intended for preparing a\ncross-compilation target. Some limitations: NIS and LDAP users/groups are not verified.\nPAM authentication is using the host files. No SELINUX support.\n",
                    "flag": "-P",
                    "long": "--prefix"
                },
                {
                    "name": "-s --shell",
                    "content": "The name of the user's login shell. The default is to leave this field blank, which\ncauses the system to select the default login shell specified by the SHELL variable in\n/etc/default/useradd, or an empty string by default.\n",
                    "flag": "-s",
                    "long": "--shell"
                },
                {
                    "name": "-u --uid",
                    "content": "The numerical value of the user's ID. This value must be unique, unless the -o option is\nused. The value must be non-negative. The default is to use the smallest ID value greater\nthan or equal to UIDMIN and greater than every other user.\n\nSee also the -r option and the UIDMAX description.\n",
                    "flag": "-u",
                    "long": "--uid"
                },
                {
                    "name": "-U --user-group",
                    "content": "Create a group with the same name as the user, and add the user to this group.\n\nThe default behavior (if the -g, -N, and -U options are not specified) is defined by the\nUSERGROUPSENAB variable in /etc/login.defs.\n",
                    "flag": "-U",
                    "long": "--user-group"
                },
                {
                    "name": "-Z --selinux-user",
                    "content": "The SELinux user for the user's login. The default is to leave this field blank, which\ncauses the system to select the default SELinux user.\n",
                    "flag": "-Z",
                    "long": "--selinux-user"
                },
                {
                    "name": "Changing the default values",
                    "content": "When invoked with only the -D option, useradd will display the current default values. When\ninvoked with -D plus other options, useradd will update the default values for the specified\noptions. Valid default-changing options are:\n"
                },
                {
                    "name": "-b --base-dir",
                    "content": "The path prefix for a new user's home directory. The user's name will be affixed to the\nend of BASEDIR to form the new user's home directory name, if the -d option is not used\nwhen creating a new account.\n\nThis option sets the HOME variable in /etc/default/useradd.\n",
                    "flag": "-b",
                    "long": "--base-dir"
                },
                {
                    "name": "-e --expiredate",
                    "content": "The date on which the user account is disabled.\n\nThis option sets the EXPIRE variable in /etc/default/useradd.\n",
                    "flag": "-e",
                    "long": "--expiredate"
                },
                {
                    "name": "-f --inactive",
                    "content": "The number of days after a password has expired before the account will be disabled.\n\nThis option sets the INACTIVE variable in /etc/default/useradd.\n",
                    "flag": "-f",
                    "long": "--inactive"
                },
                {
                    "name": "-g --gid",
                    "content": "The group name or ID for a new user's initial group (when the -N/--no-user-group is used\nor when the USERGROUPSENAB variable is set to no in /etc/login.defs). The named group\nmust exist, and a numerical group ID must have an existing entry.\n\nThis option sets the GROUP variable in /etc/default/useradd.\n",
                    "flag": "-g",
                    "long": "--gid"
                },
                {
                    "name": "-s --shell",
                    "content": "The name of a new user's login shell.\n\nThis option sets the SHELL variable in /etc/default/useradd.\n",
                    "flag": "-s",
                    "long": "--shell"
                }
            ]
        },
        "NOTES": {
            "content": "The system administrator is responsible for placing the default user files in the /etc/skel/\ndirectory (or any other skeleton directory specified in /etc/default/useradd or on the\ncommand line).\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "You may not add a user to a NIS or LDAP group. This must be performed on the corresponding\nserver.\n\nSimilarly, if the username already exists in an external user database such as NIS or LDAP,\nuseradd will deny the user account creation request.\n\nIt is usually recommended to only use usernames that begin with a lower case letter or an\nunderscore, followed by lower case letters, digits, underscores, or dashes. They can end with\na dollar sign. In regular expression terms: [a-z][a-z0-9-]*[$]?\n\nOn Debian, the only constraints are that usernames must neither start with a dash ('-') nor\nplus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space:\n' ', end of line: '\\n', tabulation: '\\t', etc.). Note that using a slash ('/') may break the\ndefault algorithm for the definition of the user's home directory.\n\nOn Ubuntu, the same constraints as Debian are in place, with the additional constraint that\nthe username cannot be fully numeric. This includes octal and hexadecimal syntax.\n\nUsernames may only be up to 32 characters long.\n",
            "subsections": []
        },
        "CONFIGURATION": {
            "content": "The following configuration variables in /etc/login.defs change the behavior of this tool:\n",
            "subsections": [
                {
                    "name": "CREATE___HOME (boolean)",
                    "content": "Indicate if a home directory should be created by default for new users.\n\nThis setting does not apply to system users, and can be overridden on the command line.\n"
                },
                {
                    "name": "GID___MAX (number), GID___MIN (number)",
                    "content": "Range of group IDs used for the creation of regular groups by useradd, groupadd, or\nnewusers.\n\nThe default value for GIDMIN (resp.  GIDMAX) is 1000 (resp. 60000).\n"
                },
                {
                    "name": "HOME___MODE (number)",
                    "content": "The mode for new home directories. If not specified, the UMASK is used to create the\nmode.\n\nuseradd and newusers use this to set the mode of the home directory they create.\n"
                },
                {
                    "name": "LASTLOG___UID___MAX (number)",
                    "content": "Highest user ID number for which the lastlog entries should be updated. As higher user\nIDs are usually tracked by remote user identity and authentication services there is no\nneed to create a huge sparse lastlog file for them.\n\nNo LASTLOGUIDMAX option present in the configuration means that there is no user ID\nlimit for writing lastlog entries.\n"
                },
                {
                    "name": "MAIL___DIR (string)",
                    "content": "The mail spool directory. This is needed to manipulate the mailbox when its corresponding\nuser account is modified or deleted. If not specified, a compile-time default is used.\n"
                },
                {
                    "name": "MAIL___FILE (string)",
                    "content": "Defines the location of the users mail spool files relatively to their home directory.\n\nThe MAILDIR and MAILFILE variables are used by useradd, usermod, and userdel to create,\nmove, or delete the user's mail spool.\n"
                },
                {
                    "name": "MAX___MEMBERS___PER___GROUP (number)",
                    "content": "Maximum members per group entry. When the maximum is reached, a new group entry (line) is\nstarted in /etc/group (with the same name, same password, and same GID).\n\nThe default value is 0, meaning that there are no limits in the number of members in a\ngroup.\n\nThis feature (split group) permits to limit the length of lines in the group file. This\nis useful to make sure that lines for NIS groups are not larger than 1024 characters.\n\nIf you need to enforce such limit, you can use 25.\n\nNote: split groups may not be supported by all tools (even in the Shadow toolsuite). You\nshould not use this variable unless you really need it.\n"
                },
                {
                    "name": "PASS___MAX___DAYS (number)",
                    "content": "The maximum number of days a password may be used. If the password is older than this, a\npassword change will be forced. If not specified, -1 will be assumed (which disables the\nrestriction).\n"
                },
                {
                    "name": "PASS___MIN___DAYS (number)",
                    "content": "The minimum number of days allowed between password changes. Any password changes\nattempted sooner than this will be rejected. If not specified, -1 will be assumed (which\ndisables the restriction).\n"
                },
                {
                    "name": "PASS___WARN___AGE (number)",
                    "content": "The number of days warning given before a password expires. A zero means warning is given\nonly upon the day of expiration, a negative value means no warning is given. If not\nspecified, no warning will be provided.\n"
                },
                {
                    "name": "SUB___GID___MIN (number), SUB___GID___MAX (number), SUB___GID___COUNT (number)",
                    "content": "If /etc/subuid exists, the commands useradd and newusers (unless the user already have\nsubordinate group IDs) allocate SUBGIDCOUNT unused group IDs from the range SUBGIDMIN\nto SUBGIDMAX for each new user.\n\nThe default values for SUBGIDMIN, SUBGIDMAX, SUBGIDCOUNT are respectively 100000,\n600100000 and 65536.\n"
                },
                {
                    "name": "SUB___UID___MIN (number), SUB___UID___MAX (number), SUB___UID___COUNT (number)",
                    "content": "If /etc/subuid exists, the commands useradd and newusers (unless the user already have\nsubordinate user IDs) allocate SUBUIDCOUNT unused user IDs from the range SUBUIDMIN\nto SUBUIDMAX for each new user.\n\nThe default values for SUBUIDMIN, SUBUIDMAX, SUBUIDCOUNT are respectively 100000,\n600100000 and 65536.\n"
                },
                {
                    "name": "SYS___GID___MAX (number), SYS___GID___MIN (number)",
                    "content": "Range of group IDs used for the creation of system groups by useradd, groupadd, or\nnewusers.\n\nThe default value for SYSGIDMIN (resp.  SYSGIDMAX) is 101 (resp.  GIDMIN-1).\n"
                },
                {
                    "name": "SYS___UID___MAX (number), SYS___UID___MIN (number)",
                    "content": "Range of user IDs used for the creation of system users by useradd or newusers.\n\nThe default value for SYSUIDMIN (resp.  SYSUIDMAX) is 101 (resp.  UIDMIN-1).\n"
                },
                {
                    "name": "UID___MAX (number), UID___MIN (number)",
                    "content": "Range of user IDs used for the creation of regular users by useradd or newusers.\n\nThe default value for UIDMIN (resp.  UIDMAX) is 1000 (resp. 60000).\n"
                },
                {
                    "name": "UMASK (number)",
                    "content": "The file mode creation mask is initialized to this value. If not specified, the mask will\nbe initialized to 022.\n\nuseradd and newusers use this mask to set the mode of the home directory they create if\nHOMEMODE is not set.\n\nIt is also used by pamumask as the default umask value.\n"
                },
                {
                    "name": "USERGROUPS___ENAB (boolean)",
                    "content": "If set to yes, userdel will remove the user's group if it contains no more members, and\nuseradd will create by default a group with the name of the user.\n"
                }
            ]
        },
        "FILES": {
            "content": "/etc/passwd\nUser account information.\n\n/etc/shadow\nSecure user account information.\n\n/etc/group\nGroup account information.\n\n/etc/gshadow\nSecure group account information.\n\n/etc/default/useradd\nDefault values for account creation.\n\n/etc/skel/\nDirectory containing default files.\n\n/etc/subgid\nPer user subordinate group IDs.\n\n/etc/subuid\nPer user subordinate user IDs.\n\n/etc/login.defs\nShadow password suite configuration.\n",
            "subsections": []
        },
        "EXIT VALUES": {
            "content": "The useradd command exits with the following values:\n\n0\nsuccess\n\n1\ncan't update password file\n\n2\ninvalid command syntax\n\n3\ninvalid argument to option\n\n4\nUID already in use (and no -o)\n\n6\nspecified group doesn't exist\n\n9\nusername already in use\n\n10\ncan't update group file\n\n12\ncan't create home directory\n\n14\ncan't update SELinux user mapping\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "chfn(1), chsh(1), passwd(1), crypt(3), groupadd(8), groupdel(8), groupmod(8), login.defs(5),\nnewusers(8), subgid(5), subuid(5), userdel(8), usermod(8).\n\n\n\nshadow-utils 4.8.1                           02/06/2024                                   USERADD(8)",
            "subsections": []
        }
    },
    "summary": "useradd - create a new user or update default new user information",
    "flags": [
        {
            "flag": "",
            "long": "--badname",
            "arg": null,
            "description": "Allow names that do not conform to standards."
        },
        {
            "flag": "-b",
            "long": "--base-dir",
            "arg": null,
            "description": "The default base directory for the system if -d HOMEDIR is not specified. BASEDIR is concatenated with the account name to define the home directory. If the -m option is not used, BASEDIR must exist. If this option is not specified, useradd will use the base directory specified by the HOME variable in /etc/default/useradd, or /home by default."
        },
        {
            "flag": "-c",
            "long": "--comment",
            "arg": null,
            "description": "Any text string. It is generally a short description of the login, and is currently used as the field for the user's full name."
        },
        {
            "flag": "-d",
            "long": "--home-dir",
            "arg": null,
            "description": "The new user will be created using HOMEDIR as the value for the user's login directory. The default is to append the LOGIN name to BASEDIR and use that as the login directory name. The directory HOMEDIR does not have to exist but will not be created if it is missing."
        },
        {
            "flag": "-D",
            "long": "--defaults",
            "arg": null,
            "description": "See below, the subsection \"Changing the default values\"."
        },
        {
            "flag": "-e",
            "long": "--expiredate",
            "arg": null,
            "description": "The date on which the user account will be disabled. The date is specified in the format YYYY-MM-DD. If not specified, useradd will use the default expiry date specified by the EXPIRE variable in /etc/default/useradd, or an empty string (no expiry) by default."
        },
        {
            "flag": "-f",
            "long": "--inactive",
            "arg": null,
            "description": "The number of days after a password expires until the account is permanently disabled. A value of 0 disables the account as soon as the password has expired, and a value of -1 disables the feature. If not specified, useradd will use the default inactivity period specified by the INACTIVE variable in /etc/default/useradd, or -1 by default."
        },
        {
            "flag": "-g",
            "long": "--gid",
            "arg": null,
            "description": "The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already existing group. If not specified, the behavior of useradd will depend on the USERGROUPSENAB variable in /etc/login.defs. If this variable is set to yes (or -U/--user-group is specified on the command line), a group will be created for the user, with the same name as her loginname. If the variable is set to no (or -N/--no-user-group is specified on the command line), useradd will set the primary group of the new user to the value specified by the GROUP variable in /etc/default/useradd, or 100 by default."
        },
        {
            "flag": "-G",
            "long": "--groups",
            "arg": null,
            "description": "A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option. The default is for the user to belong only to the initial group."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display help message and exit."
        },
        {
            "flag": "-k",
            "long": "--skel",
            "arg": null,
            "description": "The skeleton directory, which contains files and directories to be copied in the user's home directory, when the home directory is created by useradd. This option is only valid if the -m (or --create-home) option is specified. If this option is not set, the skeleton directory is defined by the SKEL variable in /etc/default/useradd or, by default, /etc/skel. If possible, the ACLs and extended attributes are copied."
        },
        {
            "flag": "-K",
            "long": "--key",
            "arg": null,
            "description": "Overrides /etc/login.defs defaults (UIDMIN, UIDMAX, UMASK, PASSMAXDAYS and others). Example: -K PASSMAXDAYS=-1 can be used when creating system account to turn off password aging, even though system account has no password at all. Multiple -K options can be specified, e.g.: -K UIDMIN=100 -K UIDMAX=499"
        },
        {
            "flag": "-l",
            "long": "--no-log-init",
            "arg": null,
            "description": "Do not add the user to the lastlog and faillog databases. By default, the user's entries in the lastlog and faillog databases are reset to avoid reusing the entry from a previously deleted user. For the compatibility with previous Debian's useradd, the -O option is also supported."
        },
        {
            "flag": "-m",
            "long": "--create-home",
            "arg": null,
            "description": "Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory. By default, if this option is not specified and CREATEHOME is not enabled, no home directories are created."
        },
        {
            "flag": "-M",
            "long": "--no-create-home",
            "arg": null,
            "description": "Do no create the user's home directory, even if the system wide setting from /etc/login.defs (CREATEHOME) is set to yes."
        },
        {
            "flag": "-N",
            "long": "--no-user-group",
            "arg": null,
            "description": "Do not create a group with the same name as the user, but add the user to the group specified by the -g option or by the GROUP variable in /etc/default/useradd. The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPSENAB variable in /etc/login.defs."
        },
        {
            "flag": "-o",
            "long": "--non-unique",
            "arg": null,
            "description": "Allow the creation of a user account with a duplicate (non-unique) UID. This option is only valid in combination with the -u option."
        },
        {
            "flag": "-p",
            "long": "--password",
            "arg": null,
            "description": "The encrypted password, as returned by crypt(3). The default is to disable the password. Note: This option is not recommended because the password (or encrypted password) will be visible by users listing the processes. You should make sure the password respects the system's password policy."
        },
        {
            "flag": "-r",
            "long": "--system",
            "arg": null,
            "description": "Create a system account. System users will be created with no aging information in /etc/shadow, and their numeric identifiers are chosen in the SYSUIDMIN-SYSUIDMAX range, defined in /etc/login.defs, instead of UIDMIN-UIDMAX (and their GID counterparts for the creation of groups). Note that useradd will not create a home directory for such a user, regardless of the default setting in /etc/login.defs (CREATEHOME). You have to specify the -m options if you want a home directory for a system account to be created."
        },
        {
            "flag": "-R",
            "long": "--root",
            "arg": null,
            "description": "Apply changes in the CHROOTDIR directory and use the configuration files from the CHROOTDIR directory."
        },
        {
            "flag": "-P",
            "long": "--prefix",
            "arg": null,
            "description": "Apply changes in the PREFIXDIR directory and use the configuration files from the PREFIXDIR directory. This option does not chroot and is intended for preparing a cross-compilation target. Some limitations: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. No SELINUX support."
        },
        {
            "flag": "-s",
            "long": "--shell",
            "arg": null,
            "description": "The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell specified by the SHELL variable in /etc/default/useradd, or an empty string by default."
        },
        {
            "flag": "-u",
            "long": "--uid",
            "arg": null,
            "description": "The numerical value of the user's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than or equal to UIDMIN and greater than every other user. See also the -r option and the UIDMAX description."
        },
        {
            "flag": "-U",
            "long": "--user-group",
            "arg": null,
            "description": "Create a group with the same name as the user, and add the user to this group. The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPSENAB variable in /etc/login.defs."
        },
        {
            "flag": "-Z",
            "long": "--selinux-user",
            "arg": null,
            "description": "The SELinux user for the user's login. The default is to leave this field blank, which causes the system to select the default SELinux user."
        },
        {
            "flag": "-b",
            "long": "--base-dir",
            "arg": null,
            "description": "The path prefix for a new user's home directory. The user's name will be affixed to the end of BASEDIR to form the new user's home directory name, if the -d option is not used when creating a new account. This option sets the HOME variable in /etc/default/useradd."
        },
        {
            "flag": "-e",
            "long": "--expiredate",
            "arg": null,
            "description": "The date on which the user account is disabled. This option sets the EXPIRE variable in /etc/default/useradd."
        },
        {
            "flag": "-f",
            "long": "--inactive",
            "arg": null,
            "description": "The number of days after a password has expired before the account will be disabled. This option sets the INACTIVE variable in /etc/default/useradd."
        },
        {
            "flag": "-g",
            "long": "--gid",
            "arg": null,
            "description": "The group name or ID for a new user's initial group (when the -N/--no-user-group is used or when the USERGROUPSENAB variable is set to no in /etc/login.defs). The named group must exist, and a numerical group ID must have an existing entry. This option sets the GROUP variable in /etc/default/useradd."
        },
        {
            "flag": "-s",
            "long": "--shell",
            "arg": null,
            "description": "The name of a new user's login shell. This option sets the SHELL variable in /etc/default/useradd."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "chfn",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chfn/1/json"
        },
        {
            "name": "chsh",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chsh/1/json"
        },
        {
            "name": "passwd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/passwd/1/json"
        },
        {
            "name": "crypt",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/crypt/3/json"
        },
        {
            "name": "groupadd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/groupadd/8/json"
        },
        {
            "name": "groupdel",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/groupdel/8/json"
        },
        {
            "name": "groupmod",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/groupmod/8/json"
        },
        {
            "name": "login.defs",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/login.defs/5/json"
        },
        {
            "name": "newusers",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/newusers/8/json"
        },
        {
            "name": "subgid",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/subgid/5/json"
        },
        {
            "name": "subuid",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/subuid/5/json"
        },
        {
            "name": "userdel",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/userdel/8/json"
        },
        {
            "name": "usermod",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/usermod/8/json"
        }
    ]
}