Project

General

Profile

How to Add and Delete Users on Ubuntu » History » Version 2

Gareth Eaton, 04/26/2023 06:32 AM

1 1 Gareth Eaton
h1. How to Add and Delete Users on Ubuntu
2 2 Gareth Eaton
3
There are two ways to add and delete users on Ubuntu: using the graphical user interface (GUI) or the command line.
4
5
h2. Add a User Using the GUI
6
7
Open the Settings app.
8
Click on the Users tab.
9
Click on the Unlock button and enter your password.
10
Click on the Add User button.
11
12
h3. Delete a User Using the GUI
13
14
Open the Settings app.
15
Click on the Users tab.
16
Click on the Unlock button and enter your password.
17
Select the user you want to delete.
18
Click on the Remove User button.
19
Click on the Remove button to confirm.
20
21
---
22
23
h2. Add a User Using the Command Line
24
25
Replace <username> with the name of the new user.
26
<pre>
27
sudo adduser <username>
28
</pre>
29
30
---
31
32
h3. Delete a User Using the Command Line
33
34
<pre>
35
sudo deluser <username>
36
</pre>
37
38
---
39
40
h2. Troubleshooting
41
42
If you are unable to add or delete users, you may need to change the permissions on the /etc/passwd file. To do this, run the following command:
43
<pre>
44
sudo chmod 644 /etc/passwd
45
46
</pre>