{"id":7630,"date":"2021-06-28T02:57:47","date_gmt":"2021-06-28T02:57:47","guid":{"rendered":"https:\/\/linuxways.net\/?p=7630"},"modified":"2021-06-28T02:57:47","modified_gmt":"2021-06-28T02:57:47","slug":"how-to-add-and-remove-users-in-linux-mint-20","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/mint\/how-to-add-and-remove-users-in-linux-mint-20\/","title":{"rendered":"How to Add and Remove Users in Linux Mint 20"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Whether you are an individual looking to make a separate workspace so that your photos don&#8217;t accidentally show up during presentation or a system administrator facing new employee inductions in your company, creating a new user is a way to go.<\/p>\n<p>In this article, you will learn how you can create new users using different methods in a Linux Mint 20 system.<\/p>\n<p><strong>Note<\/strong>: You will need a root or sudo privileged account to perform the following methods.<\/p>\n<h2>Add a New User in Linux Mint 20<\/h2>\n<h3>Method 1: Using Useradd Command<\/h3>\n<p>Open the terminal from utilities or by pressing Ctrl+Alt+T. Use the following command to add the new user. Switch \u2018-m\u2019 will make sure that the home directory is created for the user.<\/p>\n<pre>sudo useradd -m &lt;username&gt;<\/pre>\n<p>Note: Remember to replace &lt;username&gt; with the user\u2019s name.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"923\" height=\"192\" class=\"wp-image-7631\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-743.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-743.png 923w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-743-300x62.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-743-768x160.png 768w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/p>\n<p>useradd command will create the user but no password is assigned to the user so the user cannot log in. Thus you have to set the password for the user. Run the following command and provide a password when prompted.<\/p>\n<pre>sudo passwd &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"139\" class=\"wp-image-7632\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-744.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-744.png 850w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-744-300x49.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-744-768x126.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>Now that you have created the user, assign the user to a group that has desired permissions with the following command.<\/p>\n<pre>sudo usermod -a -G &lt;groupname&gt; &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"178\" class=\"wp-image-7633\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-745.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-745.png 1000w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-745-300x53.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-745-768x137.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>Verify the assigned groups with the following command.<\/p>\n<pre>sudo groups &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"88\" class=\"wp-image-7634\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-746.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-746.png 800w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-746-300x33.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-746-768x84.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>You can further explore the usermod command option through running \u2018sudo usermod -h\u2019 or \u2018man usermod\u2019.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1089\" height=\"799\" class=\"wp-image-7635\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-747.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-747.png 1089w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-747-300x220.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-747-1024x751.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-747-768x563.png 768w\" sizes=\"auto, (max-width: 1089px) 100vw, 1089px\" \/><\/p>\n<h3>Method 2: Using Adduser Command<\/h3>\n<p>Add the user by running the following command.<\/p>\n<pre>sudo adduser &lt;username&gt;<\/pre>\n<p>You will be prompted to set a password and then again to fill in user information.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"535\" class=\"wp-image-7636\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-748.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-748.png 1000w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-748-300x161.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-748-768x411.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>The user will be added and its home directory will be built by default. You can see the full options of the adduser command through \u2018sudo adduser -h\u2019 or \u2018man adduser\u2019.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1157\" height=\"806\" class=\"wp-image-7637\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-749.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-749.png 1157w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-749-300x209.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-749-1024x713.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-749-768x535.png 768w\" sizes=\"auto, (max-width: 1157px) 100vw, 1157px\" \/><\/p>\n<h3>Method 3: Using Settings Utility<\/h3>\n<p>Go and open the System Settings utility. Now navigate to the<strong> Administration&gt;Users and Groups.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"666\" class=\"wp-image-7638\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-750.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-750.png 850w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-750-300x235.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-750-768x602.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>You will be prompted for authentication.<\/p>\n<h2><a id=\"post-7630-_j3iz1arajqg3\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"265\" class=\"wp-image-7639\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-751.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-751.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-751-300x106.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/h2>\n<p>After authentication, you can see all the existing users in the system. Click on <strong>Add <\/strong>and provide account information such as account type, name, and username.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"586\" class=\"wp-image-7640\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-752.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-752.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-752-300x234.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>Fill the data accordingly and press<strong> Ok<\/strong> to create a user<strong>. <\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"312\" class=\"wp-image-7641\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-753.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-753.png 350w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-753-300x267.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>The user will be added to the system yet the <strong>Password<\/strong> field is not empty. Click on the <strong>Password <\/strong>field.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"589\" class=\"wp-image-7642\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-754.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-754.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-754-300x236.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>Next, you will be prompted to change the password. Enter the password and press <strong>Change<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"450\" height=\"270\" class=\"wp-image-7643\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-755.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-755.png 450w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-755-300x180.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"586\" class=\"wp-image-7644\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-756.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-756.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-756-300x234.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<h2>Removing a User in Linux Mint 20<\/h2>\n<h3>Method 1: Using Userdel Command<\/h3>\n<p>To remove the user from the system, run the following command.<\/p>\n<pre>sudo userdel &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"807\" class=\"wp-image-7645\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-757.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-757.png 1000w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-757-300x242.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-757-768x620.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-757-150x120.png 150w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p>You can see the user is deleted but its associated home directory is still in the system. Use the \u2018-r\u2019 switch in the command to make the home directory be deleted too.<\/p>\n<pre>sudo userdel -r &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1134\" height=\"773\" class=\"wp-image-7646\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-758.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-758.png 1134w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-758-300x204.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-758-1024x698.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-758-768x524.png 768w\" sizes=\"auto, (max-width: 1134px) 100vw, 1134px\" \/><\/p>\n<h3>Method 2: Using Deluser Command<\/h3>\n<p>You can use the following deluser command to delete the user.<\/p>\n<pre>sudo deluser &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"100\" class=\"wp-image-7647\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-759.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-759.png 950w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-759-300x32.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-759-768x81.png 768w\" sizes=\"auto, (max-width: 950px) 100vw, 950px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"850\" height=\"230\" class=\"wp-image-7648\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-760.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-760.png 850w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-760-300x81.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-760-768x208.png 768w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<p>Add \u2018&#8211;remove-home\u2019 option with your command to make sure the home directory reflects the changes.<\/p>\n<pre>sudo deluser --remove-home &lt;username&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1018\" height=\"368\" class=\"wp-image-7649\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-761.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-761.png 1018w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-761-300x108.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-761-768x278.png 768w\" sizes=\"auto, (max-width: 1018px) 100vw, 1018px\" \/><\/p>\n<p>You can also see other options that are available in the deluser command by running the following command.<\/p>\n<pre>sudo deluser -h<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1185\" height=\"789\" class=\"wp-image-7650\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-762.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-762.png 1185w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-762-300x200.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-762-1024x682.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-762-768x511.png 768w\" sizes=\"auto, (max-width: 1185px) 100vw, 1185px\" \/><\/p>\n<h3>Method 2: Using Settings Utility<\/h3>\n<p>Go to the <strong>Administration&gt;Users and Groups <\/strong>in the System Settings Utility. You will see all the available users here. Select the user you want to remove and click on the <strong>Delete<\/strong>.<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"593\" class=\"wp-image-7651\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-763.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-763.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-763-300x237.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-763-150x120.png 150w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/h3>\n<p>You will be prompted to confirm your action. Press <strong>Yes <\/strong>to delete the user.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"172\" class=\"wp-image-7652\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-764.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-764.png 750w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-764-300x69.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>This article lists down all the ways you can add or delete the user in your Linux Mint system. You can pick and choose your favorite method according to your preference.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Whether you are an individual looking to make a separate workspace so that your photos don&#8217;t accidentally show up during presentation or a system administrator facing new&hellip;<\/p>","protected":false},"author":1,"featured_media":7828,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[129,89],"class_list":["post-7630","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mint","tag-linux-mint-20","tag-users"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=7630"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7630\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/7828"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=7630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=7630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=7630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}