Forrest logo
tool overview
On this page you find all important commands for the CLI tool adduser. If the command you are looking for is missing please ask our AI.

adduser

The "adduser" command line tool is commonly used in Unix-based operating systems to create new user accounts. It is a user-friendly alternative to the "useradd" command since it interacts with the user through a series of questions. By default, "adduser" configures the system environment, creates a home directory, sets default permissions, and provides a login shell for the new user.

  1. The "adduser" command is typically executed with root privileges.
  2. It prompts the administrator for various user details like name, password, and contact information.
  3. The user information provided is then stored in the system's password and user databases.
  4. "adduser" also creates a group with the same name as the user and adds the user to that group.
  5. Additionally, it assigns a unique User ID (UID) and Group ID (GID) to the newly created user.
  6. The tool can also set an expiration date for the user account, limiting its validity for a specific period.
  7. "adduser" can customize the default shell for the user, enabling different command line environments.
  8. The tool offers options to include the new user in supplementary groups beyond their primary group.
  9. It can automatically generate a secure password for the user or allow the administrator to set it manually.
  10. After the user is created, "adduser" may offer to send a welcome email to the newly added user.

List of commands for adduser:

  • adduser:tldr:30921 adduser: Create a new user belonging to the specified group.
    $ adduser --ingroup ${group} ${username}
    try on your machine
    explain this command
  • adduser:tldr:81602 adduser: Create a new user with the specified shell set as the login shell.
    $ adduser --shell ${path-to-shell} ${username}
    try on your machine
    explain this command
  • adduser:tldr:90d0f adduser: Create a new user with a default home directory and prompt the user to set a password.
    $ adduser ${username}
    try on your machine
    explain this command
  • adduser:tldr:bb7e3 adduser: Create a new user with a home directory at the specified path.
    $ adduser --home ${path-to-home} ${username}
    try on your machine
    explain this command
  • adduser:tldr:d9117 adduser: Create a new user without a home directory.
    $ adduser --no-create-home ${username}
    try on your machine
    explain this command
tool overview