Skip to main content
Engineering LibreTexts

02-B.5: Users: Create, Modify, and Delete

  • Page ID
    2.2 Given a scenario, manage users and groups.
    3.1 Given a scenario, apply or acquire the appropriate user and/or group permissions and ownership.

    Create Users

    If we are to use Linux, we must be able to create new user accounts. To do this we use the useradd command. In addition this command allows us to assign basic settings for a user. Many of the Debian distros use the adduser command instead, although the useradd command is still available.

    adduser is not a standard Linux command. It’s essentially a Perl script that uses the useradd command in the background. This high-level utility is more efficient in properly creating new users on Linux. Default parameters for all new users can also be set through the adduser command. Since we are focusing on standard Linux, we will discuss the useradd command.

    There are several files that are used in the creation of a new user:

    User account information.

    Secure user account information.

    Group account information.

    Secure group account information.

    Default values for account creation.

    Directory containing default files.

    Per user subordinate group IDs.

    Per user subordinate user IDs.

    Shadow password suite configuration.

    Depending on the contents and configuration of the /etc/login.defs file, the useradd command may not actually create a home directory. The new user's shell is set to the default /bin/sh and a password will not be created for the new user.


    • Was this article helpful?