YouTube Icon

Code Playground.

How to Add and Delete Users on Ubuntu 18.04

CFG

How to Add and Delete Users on Ubuntu 18.04

Ubuntu, similar to some other Linux circulation, is a multi-client working framework. Every client can have diverse consent levels and explicit settings for different order line and GUI applications. 

Realizing how to add and eliminate clients is one of the essential abilities a Linux client should know. 

In this instructional exercise, we will tell you the best way to add and eliminate clients on Ubuntu 18.04. 

Prerequisites

To have the option to make and eliminate clients, you should be signed in as root or client with sudo advantages . 

How To Add User in Ubuntu

One can make another client account in Ubuntu in two different ways: 

  • From the order line. 
  • Through the GUI. 

Add a New User from the Command Line

In Ubuntu, there are two order line devices that you can use to make another client account: useradd and adduser. 

useradd is a low-level utility for adding clients, while the adduser a well disposed intuitive frontend to useradd written in Perl. 

To make another client account named username utilizing the adduser order you would run: 

sudo adduser username
Adding user `username' ...
Adding new group `username' (1001) ...
Adding new user `username' (1001) with group `username' ...
Creating home directory `/home/username' ...
Copying files from `/etc/skel' ...

You will be posed a progression of inquiries. The secret word is required, and all different fields are discretionary. 

Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
	Full Name []: 
	Room Number []: 
	Work Phone []: 
	Home Phone []: 
	Other []: 
Is the information correct? [Y/n] 

At long last, affirm that the data is right by entering Y. 

The order will make the new client's home registry, and duplicate records from/and so forth/skel catalog to the client's home index. Inside the home registry, the client can compose, alter, and erase records and registries. 

Of course on Ubuntu, individuals from the gathering sudo are conceded with sudo access. 

On the off chance that you need the recently made client to have authoritative rights, add the client to the sudo gathering : 

sudo usermod -aG sudo username

Add a New User through the GUI

On the off chance that the order line isn't your thing, you can add another client account through the GUI. 

In the Activities screen, look for "clients" and snap on "Add or eliminate clients and change your secret phrase". 

In the new window, click on the "Open" button, and enter your client secret phrase when incited. 

When you enter the secret word, the "Open" catch will change to a green "Add User" button. 

Snap on the "Add User" button, and the Add client exchange will show up: 

Select whether the new client should be a norm or executive client and enter data. When done, click on the "Add" button. 

How To Delete a User

On the off chance that the client account is not, at this point required, you can erase it either from the order line or through GUI. 

Delete a User from the Command Line

There are two order line apparatuses that you can use to erase a client account: userdel and deluser. On Ubuntu, you should utilize the deluser order as it is more inviting than the low-level userdel. 

To erase the client, without eliminating the client records, run: 

sudo deluser username

On the off chance that you need to erase the client and its home index and mail spool, utilize the - eliminate home banner: 

sudo deluser --remove-home username

Delete a User through the GUI

In the Activities screen, look for "clients" and snap on "Add or eliminate clients and change your secret phrase". 

In the new window, click on the "Open" fasten and enter your client secret phrase when provoked. When you enter the secret key, the "Open" catch will change to a green "Add User" button. 

Snap on the username you need to erase, and you will see a red "Eliminate User.." button on the base right corner. 

Snap the "Eliminate User.." catch, and you will be incited whether to keep or erase the client home catalog. Tapping on one of those catches will eliminate the client. 

Conclusion 

In this instructional exercise, you figured out how to add and eliminate clients in Ubuntu. Similar orders apply for any Ubuntu-based circulation, including Debian, Kubuntu, and Linux Mint. 

Don't hesitate to leave a remark on the off chance that you have any inquiries.




CFG