LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

adduser

Debian-friendly user and group management frontend

TLDR

Create a new user with a default home directory and prompt for a password
$ adduser [username]
copy
Create a new user without a home directory
$ adduser --no-create-home [username]
copy
Create a new user with a home directory at a specified path
$ adduser --home [path/to/home] [username]
copy
Create a new user with a specified shell
$ adduser --shell [path/to/shell] [username]
copy
Create a new user belonging to a specified group
$ adduser --ingroup [group] [username]
copy
Add an existing user to a group
$ adduser [username] [group]
copy

SYNOPSIS

adduser [options] user [group]

DESCRIPTION

adduser adds users and groups to the system according to command line options and configuration in /etc/adduser.conf. It is a Debian-specific front end to the useradd, groupadd, and usermod programs with policy-compliant defaults.The utility chooses appropriate UID/GID values, creates home directories with skeletal configuration files, and supports both regular and system accounts.

PARAMETERS

--home dir

Specify home directory
--no-create-home
Skip home directory creation
--shell shell
Set login shell
--uid ID
Specify user ID
--gid GID
Set primary group ID
--ingroup GROUP
Set primary group by name
--system
Create system account
--group
Create group (or named group for system user)
--disabled-login
Disable login (no password set, login not possible until enabled)
--disabled-password
Do not set a password (login via other methods like SSH keys still possible)
--gecos GECOS
Set GECOS field (full name, room, phone, etc.) without interactive prompt
--add-extra-groups
Add user to EXTRA_GROUPS defined in config
--firstuid ID
Override the first UID in the range for new users
--lastuid ID
Override the last UID in the range for new users
--quiet
Suppress informational messages, only show warnings and errors
--debug
Be verbose, useful for troubleshooting
--conf file
Use alternate configuration file instead of /etc/adduser.conf

CONFIGURATION

/etc/adduser.conf

Controls default behavior including home directory base path, default shell, skeleton directory, UID/GID ranges, and whether to add users to extra groups automatically.

CAVEATS

This is a Debian/Ubuntu specific frontend; other distributions may use useradd directly with different defaults. The adduser command has stricter name validation by default.

HISTORY

Developed as a Debian-specific tool to provide a friendlier interface to user management with policy-compliant defaults.

SEE ALSO

useradd(8), deluser(8), usermod(8), passwd(1), addgroup(8)

Copied to clipboard
Kai