ubuntu add user

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Christian J
    Member
    • Sep 2022
    • 90

    ubuntu add user

    Does anybody know how to add or delete a user in Ubuntu 22.04?
  • Ryaan J.
    Senior Member
    • Apr 2022
    • 102

    #2
    Ubuntu incorporates a functionality tailored for administrative users to manage user accounts, enabling actions such as addition, modification, and removal within the system. Different users are integrated into Ubuntu for task execution, with the flexibility to modify user privileges at any point.
    You are initially granted access to the root account by default upon initiating a new system. Nevertheless, the Ubuntu 22.04 system extends the capability to add or remove unprivileged accounts for additional users, utilizing both terminal commands and GUI settings.

    For adding or deleting a user via the terminal, use the subsequent commands:

    Syntax: adduser [options] username

    -c: Designates the complete name of the user.
    -d: Specifies the user's home directory.
    -g: Assigns the user's primary group.
    -G: Lists additional groups the user is part of.
    -m: Generates the user's home directory if absent.
    -s: Sets the user's login shell.
    -u: Indicates the user's UID (user ID).

    $ sudo adduser Jeff

    You will receive a prompt to input a new "password" after executing the provided command. Enter a password, your complete name, and any necessary details. Then, confirm by selecting "Y" for verification.

    Moving forward, we will add the recently created user "Jeff" to the "sudo" group using the "usermod" command:

    $ sudo usermod -aG sudo Jeff

    To conclude, verify the user's allocated group by executing the following command:
    $ groups Jeff

    To remove a user, use the provided command:
    $ sudo deluser newuser

    To eliminate both the user and their directory from your Ubuntu 22.04 system, include the "--remove-home" option within the same "deluser" command:
    $ sudodeluser --remove-hometestuser

    How to add a user through the GUI?

    1) Access the system "Settings" by manually searching for it in the "Activities" menu.

    2) Proceed to the "Users" section and select the "Unlock" button to create a new user.

    3) The "Authentication Required" wizard will appear on the screen. Input the system password and then click the "Authenticate" button.

    4) select "Add User" to create a new user.

    5) Provide the necessary details like "Full Name" and "Username." Subsequently, choose the "Set a password now" radio button and input the desired "Password."

    6) To conclude, select the "Add" button to add a new user successfully.

    How to remove the user through the GUI?

    For user deletion, navigate to the "Users" menu within the system settings and press the "Unlock" button.

    1) Enter the system password within the "Authentication Required" dialog box, then proceed to click the "Authenticate" button.

    2) Choose the user you intend to delete.

    3) Scroll down and select the "Remove User" button to delete the user.

    4) For both the user and their home directory removal, click on the "Delete Files" button:

    The account has been successfully deleted from the system.

    In Ubuntu 22.04, you can employ the command "$ sudo adduser username" to add a user to the system. You can assign "sudo" privileges to the newly created user—conversely, the command "$ deluser username" aids in deleting the users from the system. For a GUI, navigate to the "Users" section within the system "Settings," which provides user addition and removal functionalities.

    Comment

    Working...
    X