{
    "content": [
        {
            "type": "text",
            "text": "# ADDUSER (man)\n\n## NAME\n\nadduser, addgroup - add a user or group to the system\n\n## SYNOPSIS\n\nadduser  [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID]\n[--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--gecos\nGECOS] [--addextragroups] [--encrypt-home] user\nadduser  --system  [options]  [--home  DIR]  [--shell  SHELL]  [--no-create-home]  [--uid ID]\n[--group | --ingroup GROUP |  --gid  ID]  [--disabled-password]  [--disabled-login]  [--gecos\nGECOS] user\naddgroup [options] [--gid ID] group\naddgroup --system [options] [--gid ID] group\nadduser [options] user group\nCOMMON OPTIONS\n[--quiet] [--debug] [--force-badname] [--help|-h] [--version] [--conf FILE]\n\n## DESCRIPTION\n\nadduser and addgroup add users and groups to the system according to command line options and\nconfiguration information in /etc/adduser.conf.  They are friendlier front ends  to  the  low\nlevel  tools  like  useradd, groupadd and usermod programs, by default choosing Debian policy\nconformant UID and GID values, creating a home directory with skeletal configuration, running\na custom script, and other features.  adduser and addgroup can be run in one of five modes:\n\n## TLDR\n\n> User addition utility.\n\n- Create a new user with a default home directory and prompt the user to set a password:\n  `adduser {{username}}`\n- Create a new user without a home directory:\n  `adduser --no-create-home {{username}}`\n- Create a new user with a home directory at the specified path:\n  `adduser --home {{path/to/home}} {{username}}`\n- Create a new user with the specified shell set as the login shell:\n  `adduser --shell {{path/to/shell}} {{username}}`\n- Create a new user belonging to the specified group:\n  `adduser --ingroup {{group}} {{username}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (6 subsections)\n- **OPTIONS** (18 subsections)\n- **EXIT VALUES**\n- **FILES**\n- **SEE ALSO**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ADDUSER",
        "section": "",
        "mode": "man",
        "summary": "adduser, addgroup - add a user or group to the system",
        "synopsis": "adduser  [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID]\n[--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--gecos\nGECOS] [--addextragroups] [--encrypt-home] user\nadduser  --system  [options]  [--home  DIR]  [--shell  SHELL]  [--no-create-home]  [--uid ID]\n[--group | --ingroup GROUP |  --gid  ID]  [--disabled-password]  [--disabled-login]  [--gecos\nGECOS] user\naddgroup [options] [--gid ID] group\naddgroup --system [options] [--gid ID] group\nadduser [options] user group\nCOMMON OPTIONS\n[--quiet] [--debug] [--force-badname] [--help|-h] [--version] [--conf FILE]",
        "tldr_summary": "User addition utility.",
        "tldr_examples": [
            {
                "description": "Create a new user with a default home directory and prompt the user to set a password",
                "command": "adduser {{username}}"
            },
            {
                "description": "Create a new user without a home directory",
                "command": "adduser --no-create-home {{username}}"
            },
            {
                "description": "Create a new user with a home directory at the specified path",
                "command": "adduser --home {{path/to/home}} {{username}}"
            },
            {
                "description": "Create a new user with the specified shell set as the login shell",
                "command": "adduser --shell {{path/to/shell}} {{username}}"
            },
            {
                "description": "Create a new user belonging to the specified group",
                "command": "adduser --ingroup {{group}} {{username}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--conf",
                "arg": "FILE",
                "description": "Use FILE instead of /etc/adduser.conf."
            },
            {
                "flag": "",
                "long": "--disabled-login",
                "arg": null,
                "description": "Do not run passwd to set the password. The user won't be able to use her account un‐ til the password is set."
            },
            {
                "flag": "",
                "long": "--disabled-password",
                "arg": null,
                "description": "Like --disabled-login, but logins are still possible (for example using SSH RSA keys) but not using password authentication."
            },
            {
                "flag": "",
                "long": "--force-badname",
                "arg": null,
                "description": "By default, user and group names are checked against the configurable regular expres‐ sion NAMEREGEX (or NAMEREGEXSYSTEM if --system is specified) specified in the con‐ figuration file. This option forces adduser and addgroup to apply only a weak check for validity of the name. NAMEREGEX is described in adduser.conf(5)."
            },
            {
                "flag": "",
                "long": "--gecos",
                "arg": "GECOS",
                "description": "Set the gecos field for the new entry generated. adduser will not ask for finger in‐ formation if this option is given."
            },
            {
                "flag": "",
                "long": "--gid",
                "arg": "ID",
                "description": "When creating a group, this option forces the new groupid to be the given number. When creating a user, this option will put the user in that group."
            },
            {
                "flag": "",
                "long": "--group",
                "arg": null,
                "description": "When combined with --system, a group with the same name and ID as the system user is created. If not combined with --system, a group with the given name is created. This is the default action if the program is invoked as addgroup. --help Display brief instructions."
            },
            {
                "flag": "",
                "long": "--home",
                "arg": "DIR",
                "description": "Use DIR as the user's home directory, rather than the default specified by the config‐ uration file. If the directory does not exist, it is created and skeleton files are copied."
            },
            {
                "flag": "",
                "long": "--shell",
                "arg": "SHELL",
                "description": "Use SHELL as the user's login shell, rather than the default specified by the configu‐ ration file."
            },
            {
                "flag": "",
                "long": "--ingroup",
                "arg": "GROUP",
                "description": "Add the new user to GROUP instead of a usergroup or the default group defined by USERSGID in the configuration file. This affects the users primary group. To add additional groups, see the addextragroups option."
            },
            {
                "flag": "",
                "long": "--no-create-home",
                "arg": null,
                "description": "Do not create the home directory, even if it doesn't exist."
            },
            {
                "flag": "",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress informational messages, only show warnings and errors."
            },
            {
                "flag": "",
                "long": "--debug",
                "arg": null,
                "description": "Be verbose, most useful if you want to nail down a problem with adduser."
            },
            {
                "flag": "",
                "long": "--system",
                "arg": null,
                "description": "Create a system user or group."
            },
            {
                "flag": "",
                "long": "--uid",
                "arg": "ID",
                "description": "Force the new userid to be the given number. adduser will fail if the userid is al‐ ready taken."
            },
            {
                "flag": "",
                "long": "--firstuid",
                "arg": "ID",
                "description": "Override the first uid in the range that the uid is chosen from (overrides FIRSTUID specified in the configuration file)."
            },
            {
                "flag": "",
                "long": "--lastuid",
                "arg": "ID",
                "description": "Override the last uid in the range that the uid is chosen from ( LASTUID ) --addextragroups Add new user to extra groups defined in the configuration file."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Display version and copyright information."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "adduser.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/adduser.conf/5/json"
            },
            {
                "name": "deluser",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/deluser/8/json"
            },
            {
                "name": "groupadd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/groupadd/8/json"
            },
            {
                "name": "useradd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/useradd/8/json"
            },
            {
                "name": "usermod",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/usermod/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "Add a normal user",
                        "lines": 29
                    },
                    {
                        "name": "vate(1).",
                        "lines": 16
                    },
                    {
                        "name": "Add a system user",
                        "lines": 17
                    },
                    {
                        "name": "Add a user group",
                        "lines": 10
                    },
                    {
                        "name": "Add a system group",
                        "lines": 8
                    },
                    {
                        "name": "Add an existing user to an existing group",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--conf FILE",
                        "lines": 2,
                        "long": "--conf",
                        "arg": "FILE"
                    },
                    {
                        "name": "--disabled-login",
                        "lines": 3,
                        "long": "--disabled-login"
                    },
                    {
                        "name": "--disabled-password",
                        "lines": 3,
                        "long": "--disabled-password"
                    },
                    {
                        "name": "--force-badname",
                        "lines": 5,
                        "long": "--force-badname"
                    },
                    {
                        "name": "--gecos GECOS",
                        "lines": 3,
                        "long": "--gecos",
                        "arg": "GECOS"
                    },
                    {
                        "name": "--gid ID",
                        "lines": 3,
                        "long": "--gid",
                        "arg": "ID"
                    },
                    {
                        "name": "--group",
                        "lines": 6,
                        "long": "--group"
                    },
                    {
                        "name": "--home DIR",
                        "lines": 4,
                        "long": "--home",
                        "arg": "DIR"
                    },
                    {
                        "name": "--shell SHELL",
                        "lines": 3,
                        "long": "--shell",
                        "arg": "SHELL"
                    },
                    {
                        "name": "--ingroup GROUP",
                        "lines": 4,
                        "long": "--ingroup",
                        "arg": "GROUP"
                    },
                    {
                        "name": "--no-create-home",
                        "lines": 2,
                        "long": "--no-create-home"
                    },
                    {
                        "name": "--quiet",
                        "lines": 2,
                        "long": "--quiet"
                    },
                    {
                        "name": "--debug",
                        "lines": 2,
                        "long": "--debug"
                    },
                    {
                        "name": "--system",
                        "lines": 2,
                        "long": "--system"
                    },
                    {
                        "name": "--uid ID",
                        "lines": 3,
                        "long": "--uid",
                        "arg": "ID"
                    },
                    {
                        "name": "--firstuid ID",
                        "lines": 3,
                        "long": "--firstuid",
                        "arg": "ID"
                    },
                    {
                        "name": "--lastuid ID",
                        "lines": 5,
                        "long": "--lastuid",
                        "arg": "ID"
                    },
                    {
                        "name": "--version",
                        "lines": 3,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT VALUES",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "adduser, addgroup - add a user or group to the system\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "adduser  [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID]\n[--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] [--gecos\nGECOS] [--addextragroups] [--encrypt-home] user\n\nadduser  --system  [options]  [--home  DIR]  [--shell  SHELL]  [--no-create-home]  [--uid ID]\n[--group | --ingroup GROUP |  --gid  ID]  [--disabled-password]  [--disabled-login]  [--gecos\nGECOS] user\n\naddgroup [options] [--gid ID] group\n\naddgroup --system [options] [--gid ID] group\n\nadduser [options] user group\n\nCOMMON OPTIONS\n[--quiet] [--debug] [--force-badname] [--help|-h] [--version] [--conf FILE]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "adduser and addgroup add users and groups to the system according to command line options and\nconfiguration information in /etc/adduser.conf.  They are friendlier front ends  to  the  low\nlevel  tools  like  useradd, groupadd and usermod programs, by default choosing Debian policy\nconformant UID and GID values, creating a home directory with skeletal configuration, running\na custom script, and other features.  adduser and addgroup can be run in one of five modes:\n",
                "subsections": [
                    {
                        "name": "Add a normal user",
                        "content": "If  called  with one non-option argument and without the --system or --group options, adduser\nwill add a normal user.\n\nadduser will choose the first available UID from the range specified for normal users in  the\nconfiguration file.  The UID can be overridden with the --uid option.\n\nThe  range  specified  in  the  configuration  file may be overridden with the --firstuid and\n--lastuid options.\n\nBy default, each user in Debian GNU/Linux is given a corresponding group with the same  name.\nUsergroups  allow group writable directories to be easily maintained by placing the appropri‐\nate users in the new group, setting the set-group-ID bit in the directory, and ensuring  that\nall  users use a umask of 002.  If this option is turned off by setting USERGROUPS to no, all\nusers' GIDs are set to USERSGID.  Users' primary groups can also be overridden from the com‐\nmand  line  with the --gid or --ingroup options to set the group by id or name, respectively.\nAlso, users can be added to one or more groups defined  in  adduser.conf  either  by  setting\nADDEXTRAGROUPS to 1 in adduser.conf, or by passing --addextragroups on the commandline.\n\nadduser will create a home directory subject to DHOME, GROUPHOMES, and LETTERHOMES.  The home\ndirectory can be overridden from the command line with the --home option, and the shell  with\nthe --shell option. The home directory's set-group-ID bit is set if USERGROUPS is yes so that\nany files created in the user's home directory will have the correct group.\n\nadduser will copy files from SKEL into the home directory and prompt for finger  (gecos)  in‐\nformation  and  a  password.   The  gecos  may also be set with the --gecos option.  With the\n--disabled-login option, the account will be created but will be disabled until a password is\nset. The --disabled-password option will not set a password, but login is still possible (for\nexample with SSH RSA keys).  To set up an encrypted home directory for the new user, add  the\n--encrypt-home  option.   For more information, refer to the -b option of ecryptfs-setup-pri‐‐"
                    },
                    {
                        "name": "vate(1).",
                        "content": "If the file /usr/local/sbin/adduser.local exists, it will be executed after the user  account\nhas been set up in order to do any local setup.  The arguments passed to adduser.local are:\nusername uid gid home-directory\nThe environment variable VERBOSE is set according to the following rule:\n\n0 if   --quiet is specified\n\n1 if neither\n--quiet nor --debug is specified\n\n2 if   --debug is specified\n\n(The  same  applies to the variable DEBUG, but DEBUG is deprecated and will be removed\nin a later version of adduser.)\n\n"
                    },
                    {
                        "name": "Add a system user",
                        "content": "If called with one non-option argument and the --system option, adduser  will  add  a  system\nuser.  If a user with the same name already exists in the system uid range (or, if the uid is\nspecified, if a user with that uid already exists), adduser will exit with  a  warning.  This\nwarning can be suppressed by adding --quiet.\n\nadduser  will choose the first available UID from the range specified for system users in the\nconfiguration file (FIRSTSYSTEMUID and LASTSYSTEMUID). If you want  to  have  a  specific\nUID, you can specify it using the --uid option.\n\nBy default, system users are placed in the nogroup group.  To place the new system user in an\nalready existing group, use the --gid or --ingroup options.  To place the new system user  in\na new group with the same ID, use the --group option.\n\nA  home directory is created by the same rules as for normal users.  The new system user will\nhave the shell /usr/sbin/nologin (unless overridden with the --shell option), and have logins\ndisabled.  Skeletal configuration files are not copied.\n"
                    },
                    {
                        "name": "Add a user group",
                        "content": "If  adduser is called with the --group option and without the --system option, or addgroup is\ncalled respectively, a user group will be added.\n\n\nA GID will be chosen from the range specified for  system  GIDS  in  the  configuration  file\n(FIRSTGID,  LASTGID).  To  override that mechanism you can give the GID using the --gid op‐\ntion.\n\nThe group is created with no users.\n"
                    },
                    {
                        "name": "Add a system group",
                        "content": "If addgroup is called with the --system option, a system group will be added.\n\nA GID will be chosen from the range specified for  system  GIDS  in  the  configuration  file\n(FIRSTSYSTEMGID,  LASTSYSTEMGID).  To  override that mechanism you can give the GID using\nthe --gid option.\n\nThe group is created with no users.\n"
                    },
                    {
                        "name": "Add an existing user to an existing group",
                        "content": "If called with two non-option arguments, adduser will add an existing  user  to  an  existing\ngroup.\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--conf FILE",
                        "content": "Use FILE instead of /etc/adduser.conf.\n",
                        "long": "--conf",
                        "arg": "FILE"
                    },
                    {
                        "name": "--disabled-login",
                        "content": "Do  not run passwd to set the password.  The user won't be able to use her account un‐\ntil the password is set.\n",
                        "long": "--disabled-login"
                    },
                    {
                        "name": "--disabled-password",
                        "content": "Like --disabled-login, but logins are still possible (for example using SSH RSA  keys)\nbut not using password authentication.\n",
                        "long": "--disabled-password"
                    },
                    {
                        "name": "--force-badname",
                        "content": "By  default, user and group names are checked against the configurable regular expres‐\nsion NAMEREGEX (or NAMEREGEXSYSTEM if --system is specified) specified in the  con‐\nfiguration  file.  This  option forces adduser and addgroup to apply only a weak check\nfor validity of the name.  NAMEREGEX is described in adduser.conf(5).\n",
                        "long": "--force-badname"
                    },
                    {
                        "name": "--gecos GECOS",
                        "content": "Set the gecos field for the new entry generated.  adduser will not ask for finger  in‐\nformation if this option is given.\n",
                        "long": "--gecos",
                        "arg": "GECOS"
                    },
                    {
                        "name": "--gid ID",
                        "content": "When  creating  a  group,  this  option forces the new groupid to be the given number.\nWhen creating a user, this option will put the user in that group.\n",
                        "long": "--gid",
                        "arg": "ID"
                    },
                    {
                        "name": "--group",
                        "content": "When combined with --system, a group with the same name and ID as the system  user  is\ncreated.  If not combined with --system, a group with the given name is created.  This\nis the default action if the program is invoked as addgroup.\n\n--help Display brief instructions.\n",
                        "long": "--group"
                    },
                    {
                        "name": "--home DIR",
                        "content": "Use DIR as the user's home directory, rather than the default specified by the config‐\nuration  file.   If the directory does not exist, it is created and skeleton files are\ncopied.\n",
                        "long": "--home",
                        "arg": "DIR"
                    },
                    {
                        "name": "--shell SHELL",
                        "content": "Use SHELL as the user's login shell, rather than the default specified by the configu‐\nration file.\n",
                        "long": "--shell",
                        "arg": "SHELL"
                    },
                    {
                        "name": "--ingroup GROUP",
                        "content": "Add  the  new  user  to  GROUP  instead of a usergroup or the default group defined by\nUSERSGID in the configuration file.  This affects the users primary  group.   To  add\nadditional groups, see the addextragroups option.\n",
                        "long": "--ingroup",
                        "arg": "GROUP"
                    },
                    {
                        "name": "--no-create-home",
                        "content": "Do not create the home directory, even if it doesn't exist.\n",
                        "long": "--no-create-home"
                    },
                    {
                        "name": "--quiet",
                        "content": "Suppress informational messages, only show warnings and errors.\n",
                        "long": "--quiet"
                    },
                    {
                        "name": "--debug",
                        "content": "Be verbose, most useful if you want to nail down a problem with adduser.\n",
                        "long": "--debug"
                    },
                    {
                        "name": "--system",
                        "content": "Create a system user or group.\n",
                        "long": "--system"
                    },
                    {
                        "name": "--uid ID",
                        "content": "Force  the  new userid to be the given number.  adduser will fail if the userid is al‐\nready taken.\n",
                        "long": "--uid",
                        "arg": "ID"
                    },
                    {
                        "name": "--firstuid ID",
                        "content": "Override the first uid in the range that the uid is chosen from  (overrides  FIRSTUID\nspecified in the configuration file).\n",
                        "long": "--firstuid",
                        "arg": "ID"
                    },
                    {
                        "name": "--lastuid ID",
                        "content": "Override the last uid in the range that the uid is chosen from ( LASTUID )\n\n--addextragroups\nAdd new user to extra groups defined in the configuration file.\n",
                        "long": "--lastuid",
                        "arg": "ID"
                    },
                    {
                        "name": "--version",
                        "content": "Display version and copyright information.\n\n",
                        "long": "--version"
                    }
                ]
            },
            "EXIT VALUES": {
                "content": "0      The  user exists as specified. This can have 2 causes: The user was created by adduser\nor the user was already present on the system before adduser was invoked.  If  adduser\nwas  returning  0  , invoking adduser a second time with the same parameters as before\nalso returns 0.\n\n1      Creating the user or group failed because it was already present  with  other  UID/GID\nthan  specified. The username or groupname was rejected because of a mismatch with the\nconfigured regular expressions, see adduser.conf(5). Adduser has  been  aborted  by  a\nsignal.\nOr  for many other yet undocumented reasons which are printed to console then. You may\nthen consider to remove --quiet to make adduser more verbose.\n\n",
                "subsections": []
            },
            "FILES": {
                "content": "/etc/adduser.conf\nDefault configuration file for adduser and addgroup\n\n/usr/local/sbin/adduser.local\nOptional custom add-ons.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "adduser.conf(5), deluser(8), groupadd(8), useradd(8), usermod(8), Debian Policy 9.2.2.\n\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (C) 1997, 1998, 1999 Guy Maor. Modifications by Roland Bauerschmidt and Marc Haber.\nAdditional patches by Joerg Hoh and Stephen Gran.\nCopyright (C) 1995 Ted Hajek, with a great deal borrowed from the original Debian adduser\nCopyright (C) 1994 Ian Murdock.  adduser is free software; see the GNU General Public Licence\nversion 2 or later for copying conditions.  There is no warranty.\n\n\n\nDebian GNU/Linux                        Version 3.118ubuntu5                              ADDUSER(8)",
                "subsections": []
            }
        }
    }
}