Created
November 11, 2011 17:25
-
-
Save raldred/1358611 to your computer and use it in GitHub Desktop.
adduser man page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ADDUSER(8) ADDUSER(8) | |
NAME | |
adduser, addgroup - add a user or group to the system | |
SYNOPSIS | |
adduser [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--firstuid ID] [--lastuid ID] [--ingroup GROUP | --gid ID] [--disabled-password] [--dis‐ | |
abled-login] [--gecos GECOS] [--add_extra_groups] [--encrypt-home] user | |
adduser --system [options] [--home DIR] [--shell SHELL] [--no-create-home] [--uid ID] [--group | --ingroup GROUP | --gid ID] [--disabled-password] [--disabled-login] | |
[--gecos GECOS] user | |
addgroup [options] [--gid ID] group | |
addgroup --system [options] [--gid ID] group | |
adduser [options] user group | |
COMMON OPTIONS | |
[--quiet] [--debug] [--force-badname] [--help|-h] [--version] [--conf FILE] | |
DESCRIPTION | |
adduser and addgroup add users and groups to the system according to command line options and configuration information in /etc/adduser.conf. They are friendlier front | |
ends to the low level tools like useradd, groupadd and usermod programs, by default choosing Debian policy conformant UID and GID values, creating a home directory with | |
skeletal configuration, running a custom script, and other features. adduser and addgroup can be run in one of five modes: | |
Add a normal user | |
If called with one non-option argument and without the --system or --group options, adduser will add a normal user. | |
adduser will choose the first available UID from the range specified for normal users in the configuration file. The UID can be overridden with the --uid option. | |
The range specified in the configuration file may be overridden with the --firstuid and --lastuid options. | |
By default, each user in Debian GNU/Linux is given a corresponding group with the same name. Usergroups allow group writable directories to be easily maintained by | |
placing the appropriate users in the new group, setting the set-group-ID bit in the directory, and ensuring that all users use a umask of 002. If this option is turned | |
off by setting USERGROUPS to no, all users' GIDs are set to USERS_GID. Users' primary groups can also be overridden from the command line with the --gid or --ingroup | |
options to set the group by id or name, respectively. Also, users can be added to one or more groups defined in adduser.conf either by setting ADD_EXTRA_GROUPS to 1 in | |
adduser.conf, or by passing --add_extra_groups on the commandline. | |
adduser will create a home directory subject to DHOME, GROUPHOMES, and LETTERHOMES. The home directory can be overridden from the command line with the --home option, | |
and the shell with the --shell option. The home directory's set-group-ID bit is set if USERGROUPS is yes so that any files created in the user's home directory will | |
have the correct group. | |
adduser will copy files from SKEL into the home directory and prompt for finger (gecos) information and a password. The gecos may also be set with the --gecos option. | |
With the --disabled-login option, the account will be created but will be disabled until a password is set. The --disabled-password option will not set a password, but | |
login is still possible (for example with SSH RSA keys). To set up an encrypted home directory for the new user, add the --encrypt-home option. For more information, | |
refer to the -b option of ecryptfs-setup-private(1). | |
If the file /usr/local/sbin/adduser.local exists, it will be executed after the user account has been set up in order to do any local setup. The arguments passed to | |
adduser.local are: | |
username uid gid home-directory | |
The environment variable VERBOSE is set according to the following rule: | |
0 if --quiet is specified | |
1 if neither --quiet nor --debug is specified | |
2 if --debug is specified | |
(The same applies to the variable DEBUG, but DEBUG is deprecated and will be removed in a later version of adduser.) | |
Add a system group | |
If addgroup is called with the --system option, a system group will be added. | |
A GID will be chosen from the range specified for system GIDS in the configuration file (FIRST_SYSTEM_GID, LAST_SYSTEM_GID). To override that mechanism you can give the | |
GID using the --gid option. | |
The group is created with no users. | |
Add an existing user to an existing group | |
If called with two non-option arguments, adduser will add an existing user to an existing group. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment