How to Add User on Ubuntu 20.04

As an Ubuntu user, you might need to create an additional user account for your family members, colleagues, or friends to share your system. Adding a user account in Ubuntu is a simple process that requires only a few simple steps. In this guide, we’ll walk you through how to add user accounts on Ubuntu 20.04.

Video Tutorial:

What’s Needed

To create a new user account on Ubuntu 20.04, you need to have the following:

  • A running Ubuntu 20.04 system
  • Sudo privileges
  • The user account details with you: username, password, etc.

What Requires Your Focus?

To add a user to Ubuntu, you need to focus on the following:

  • Creating a new user account with the right username and password
  • Saving the user account details for future access
  • Giving the user administrative access (optional)
  • Setting the user’s privileges and permissions

Different Methods to Add User on Ubuntu 20.04

Method 1: Using the Terminal

This method is a command-line method to create a new user account in Ubuntu 20.04.

Step 1. Open the terminal by pressing "Ctrl + Alt + T."

Step 2. Type the following command to create the new user account:

sudo adduser username

Replace “username” with the name of the user you want to create.

Step 3. Set the password for the new user account by typing:

sudo passwd username

Replace “username” with the same username you used in Step 2.

Step 4. Add the user account to the sudo group by typing:

sudo usermod –aG sudo username

Step 5. Log in to the newly created user account by typing:

su - username

Pros:

  • A quicker and direct way to create a user account
  • Allows you to easily customize the user’s privileges and permissions

Cons:

  • Requires some familiarity with the Linux command line
  • May cause errors if you type the wrong command or misspell a word

Method 2: Using The GUI

This method is a graphical method to create a new user account in Ubuntu 20.04.

Step 1. Click on the top-right corner of your desktop and click on the settings icon.

Step 2. Type “Users” in the search bar and click on the “Users” option.

Step 3. Click on the “Unlock” option and enter your password.

Step 4. Click on the “+” sign to add a new user account.

Step 5. Fill in the details of the new user account, including username, password, and account type.

Pros:

  • A more visually appealing and user-friendly method
  • Reduces the chances of making errors

Cons:

  • May not allow you to customize the user’s privileges as much as the command line method
  • Can be slower for experienced Linux users

Method 3: Copying an Existing User Account

This method is useful if you want to create a new user account with the same privileges and permissions as an existing user account.

Step 1. Open the terminal and type the following command to copy the existing user account:

sudo cp -a /home/olduser /home/newuser

Replace “olduser” with the name of the existing user account and “newuser” with the name of the new user account.

Step 2. Set a new password for the new user account by typing:

sudo passwd newuser

Step 3. Log in to the newly created user account by typing:

su – newuser

Pros:

  • Can save you time and effort in setting up a new account
  • Allows the new user account to inherit the same properties of the old account

Cons:

  • The new account may inherit any errors or bugs of the old account
  • Doesn’t allow for much customization of the new account privileges

Why Can’t I Add User on Ubuntu 20.04?

If you’re unable to add a new user account on Ubuntu 20.04, it may be due to the following reasons:

Q: I don’t have sufficient rights to add a new user account. What should I do?

A: You need to have administrative privileges to create a new user account. Make sure you have ‘sudo’ privileges and are logged in as the root user.

Q: I can’t remember the username for my new account. Is there a way to recover it?

A: You can use the ‘grep’ command to find the username for the new account by typing:

grep '/bin/bash' /etc/passwd | awk -F: '{print $1}'

Q: I forgot my password. Can I reset the password?

A: You can reset the password for the new user account using the ‘passwd’ command. Type:

sudo passwd username

Replace “username” with the name of the user account whose password you’d like to reset.

Q: Why isn’t the new user account showing up on the login screen?

A: It may take a few minutes for the new user account to be recognized. Log out of the system and allow a few minutes for the new user account to be recognized.

Q: Why isn’t the ‘adduser’ command working for me?

A: If the ‘adduser’ command isn’t working, it may be due to an issue with your system’s configuration files. Try reinstalling Ubuntu or checking for updates to your system.

Implications and Recommendations

Adding a user account on Ubuntu can be a simple process, but it’s important to do it correctly to avoid any issues down the line. Here are a few recommendations to keep in mind:

  • Use a strong password for the new user account to prevent unauthorized access.
  • Give users only the privileges and permissions they need to do their job.
  • If possible, restrict access to the root user to prevent malicious users from causing damage to the system.
  • Make sure to keep an organized record of your user accounts and their details for future reference.

5 FAQs about Adding a User on Ubuntu 20.04

Q1. How many user accounts can I create in Ubuntu 20.04?

A1. You can create an unlimited number of user accounts on Ubuntu 20.04.

Q2. Can I add a user account without administrative privileges?

A2: No, you need to have administrative privileges to create a new user account in Ubuntu 20.04.

Q3. Can I change the username of my new user account after creating it?

A3: Yes, you can change the username of a user account in Ubuntu 20.04 using the ‘usermod’ command.

Q4. How do I delete a user account?

A4: To delete a user account, you can use the ‘userdel’ command. Type:

sudo userdel username

Replace “username” with the name of the user account you’d like to delete.

Q5. How can I view the list of user accounts on my Ubuntu system?

A5: You can view the list of user accounts on your Ubuntu system using the ‘cat’ command on the ‘/etc/passwd’ file. Type:

cat /etc/passwd

In Conclusion

Adding a user account on Ubuntu 20.04 is an essential skill for any Ubuntu user. This guide has provided you with three different methods to create a new user account on Ubuntu 20.04, along with some tips, recommendations, and FAQs to keep in mind. By following these steps, you can confidently create and manage user accounts on your Ubuntu system.

Leave a Reply

Your email address will not be published. Required fields are marked *