{"id":33970,"date":"2020-09-01T13:09:45","date_gmt":"2020-09-01T18:09:45","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=33970"},"modified":"2023-04-04T03:46:53","modified_gmt":"2023-04-04T08:46:53","slug":"how-to-add-a-user-to-a-group-on-a-linux-server","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/","title":{"rendered":"How to Add a User to a Group on a Linux Server"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\" alt=\"How to Add a User to a Group on Linux\" class=\"wp-image-34187\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>User groups play an important role in any Linux operating system and its distributions. Groups make it easier to manage larger amounts of users, giving you the ability to give all of them the same security and access privileges. <\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"alignright size-large\"><img decoding=\"async\" width=\"120\" height=\"119\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/add-user-to-group-guide-for-linux.jpg\" alt=\"\" class=\"wp-image-34188\"\/><\/figure><\/div>\n\n\n\n<p>For example, files and devices may be granted access based on a user&#8217;s ID or group ID. Groups allow you to set a file&#8217;s permission for the entire group instead of setting permissions for each individual user. Overall, this makes managing permissions for your server&#8217;s users a very simple and straightforward process. Let&#8217;s show you how to add users to groups on a <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">Linux VPS<\/a>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>There are two types of groups in Linux operating systems:<\/p>\n\n\n\n<p><strong>Primary Groups<\/strong><\/p>\n\n\n\n<p>When you create a new user on your system, a primary group with the same name is created. Any files created by the user are automatically added to that group.<br>The information about the user&#8217;s primary group is stored in the <code>\/etc\/passwd<\/code> file.<\/p>\n\n\n\n<p><strong>Secondary Groups<\/strong><\/p>\n\n\n\n<p>The secondary group specifies one or more groups that an account also belongs to. Secondary groups are very useful when you want to grant certain file permissions to specific users that are members of a specific group.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69c24e6ba2454\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69c24e6ba2454\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Getting-Started-Create-a-User-and-Group\" >Getting Started: Create a User and Group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Adding-an-Existing-User-to-a-Group\" >Adding an Existing User to a Group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Add-an-Existing-User-to-Multiple-Groups\" >Add an Existing User to Multiple Groups<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Add-Multiple-Users-to-a-Single-Group\" >Add Multiple Users to a Single Group<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Create-a-New-User-and-Assign-a-Group-at-Once\" >Create a New User and Assign a Group at Once<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#Change-a-Users-Primary-Group\" >Change a User&#8217;s Primary Group<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>A Linux server or Linux VPS with root access enabled or a user with sudo privileges. Our VPSes all have root access fully enabled and available for all of our users.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Getting-Started-Create-a-User-and-Group\"><\/span>Getting Started: Create a User and Group<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To create a new user named <code>user1<\/code>, simply run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd user1<\/pre>\n\n\n\n<p>You can also create specific groups with a name of your choice. create a new group named <code>group1<\/code> with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">groupadd group1<\/pre>\n\n\n\n<p>Once a user has been created, you can then view the groups that the specific user account is in with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">groups user1<\/pre>\n\n\n\n<p>Running that command should give you the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user1 : user1\n<\/pre>\n\n\n\n<p>If you want to view a list of all groups that exist on your system, that&#8217;s possible as well.  You can do that by using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">getent group<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Adding-an-Existing-User-to-a-Group\"><\/span>Adding an Existing User to a Group<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can add an existing user to a secondary group &#8211; just use the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -a -G groupname username<\/pre>\n\n\n\n<p>For example, to add <code>user1<\/code> to the <code>sudo<\/code> group, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -a -G sudo user1<\/pre>\n\n\n\n<p>You can now verify this change with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">groups user1<\/pre>\n\n\n\n<p>That should give you the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">user1 : user1 sudo\n<\/pre>\n\n\n\n<p>You can also remove a user from the specified group by using the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gpasswd -d username groupname<\/pre>\n\n\n\n<p>And to give you another example, let&#8217;s remove <code>user1<\/code> from the <code>sudo<\/code> group. Run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gpasswd -d user1 sudo<\/pre>\n\n\n\n<p>Here&#8217;s how the output should look:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Removing user user1 from group sudo\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Add-an-Existing-User-to-Multiple-Groups\"><\/span>Add an Existing User to Multiple Groups<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Adding an existing user to multiple groups is very similar to adding them to just one &#8211; we can do so in a single command by using the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -a -G group1,group2 user<\/pre>\n\n\n\n<p>For example, add a user named <code>user1<\/code> to the group <code>sudo<\/code> and <code>www-data<\/code> using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -a -G sudo,www-data user1<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Add-Multiple-Users-to-a-Single-Group\"><\/span>Add Multiple Users to a Single Group<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you want to add multiple users to a single group, use the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gpasswd -M user1,user2,user3 groupname<\/pre>\n\n\n\n<p>For example, we can add multiple users named <code>user1<\/code>, <code>user2<\/code>, and <code>user3<\/code> to the <code>users<\/code> group with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gpasswd -M user1,user2,user3 users<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Create-a-New-User-and-Assign-a-Group-at-Once\"><\/span>Create a New User and Assign a Group at Once<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In some cases, you will need to create a new account and assign it to a specific group. We can accomplish this by using the <code>-G<\/code> option combined with the useradd command. In that case, you can use the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd -G groupname newuser<\/pre>\n\n\n\n<p>For example, to assign the group <code>sudo<\/code> for the new user while creating a new user named <code>user4<\/code>, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">useradd -G sudo user4<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Change-a-Users-Primary-Group\"><\/span>Change a User&#8217;s Primary Group<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can also change the primary group of any user using the <code>-g<\/code> option combined with the <code>usermod<\/code> command.<\/p>\n\n\n\n<p>For example, to change the primary group of the user <code>user4<\/code> to <code>www-data<\/code>, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">usermod -g www-data user4<\/pre>\n\n\n\n<p>In the above guide, you learned how to add users to a group in Linux with a few practical examples. We also covered how to change what group an account is in, assigning one while creating a new user account, and so on. I hope this will help you on the Linux operating system that you use, such as Debian, Ubuntu, CentOS or Fedora.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"alignleft size-large\"><img decoding=\"async\" width=\"125\" height=\"125\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/user-group-permissions-management-by-expert-support-team-for-linux-vps.jpg\" alt=\"\" class=\"wp-image-34189\"\/><\/figure><\/div>\n\n\n\n<p>Managing several groups and configuring your server&#8217;s permissions in detail can be a frustrating and tedious task. If you use our <a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\">Managed Linux VPS hosting<\/a> services, you can simply ask our expert support team to set up groups and assign specific permissions for each group, and even configure your files to have these permissions set up. They&#8217;re always available and can help you with almost any aspect of managing and maintaining your server.<\/p>\n\n\n\n<p>If this post helped you configure your groups, we would appreciate you sharing it on social media with our share shortcuts. You can also leave any questions or additional tips in our comment section below. Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>User groups play an important role in any Linux operating system and its distributions. Groups make it easier to manage &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Add a User to a Group on a Linux Server\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#more-33970\" aria-label=\"Read more about How to Add a User to a Group on a Linux Server\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[1848,27],"class_list":["post-33970","post","type-post","status-publish","format-standard","hentry","category-tips-and-tricks","tag-add-a-user-to-a-group","tag-linux","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Add a User to a Group on a Linux Server | RoseHosting<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to add a user to a group, along with some useful tips and tricks for configuring user groups.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add a User to a Group on a Linux Server\" \/>\n<meta property=\"og:description\" content=\"How to Add a User to a Group on a Linux Server | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-01T18:09:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-04T08:46:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Add a User to a Group on a Linux Server\",\"datePublished\":\"2020-09-01T18:09:45+00:00\",\"dateModified\":\"2023-04-04T08:46:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\"},\"wordCount\":807,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\",\"keywords\":[\"add a user to a group\",\"Linux\"],\"articleSection\":[\"Tips and Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\",\"name\":\"How to Add a User to a Group on a Linux Server | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\",\"datePublished\":\"2020-09-01T18:09:45+00:00\",\"dateModified\":\"2023-04-04T08:46:53+00:00\",\"description\":\"This tutorial will show you how to add a user to a group, along with some useful tips and tricks for configuring user groups.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg\",\"width\":742,\"height\":372,\"caption\":\"How to Add a User to a Group on Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add a User to a Group on a Linux Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Add a User to a Group on a Linux Server | RoseHosting","description":"This tutorial will show you how to add a user to a group, along with some useful tips and tricks for configuring user groups.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/","og_locale":"en_US","og_type":"article","og_title":"How to Add a User to a Group on a Linux Server","og_description":"How to Add a User to a Group on a Linux Server | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2020-09-01T18:09:45+00:00","article_modified_time":"2023-04-04T08:46:53+00:00","og_image":[{"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg","type":"","width":"","height":""}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Add a User to a Group on a Linux Server","datePublished":"2020-09-01T18:09:45+00:00","dateModified":"2023-04-04T08:46:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/"},"wordCount":807,"commentCount":1,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg","keywords":["add a user to a group","Linux"],"articleSection":["Tips and Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/","name":"How to Add a User to a Group on a Linux Server | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg","datePublished":"2020-09-01T18:09:45+00:00","dateModified":"2023-04-04T08:46:53+00:00","description":"This tutorial will show you how to add a user to a group, along with some useful tips and tricks for configuring user groups.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2020\/09\/how-to-add-a-user-to-a-group-on-linux.jpg","width":742,"height":372,"caption":"How to Add a User to a Group on Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-add-a-user-to-a-group-on-a-linux-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add a User to a Group on a Linux Server"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=33970"}],"version-history":[{"count":7,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33970\/revisions"}],"predecessor-version":[{"id":37107,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/33970\/revisions\/37107"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=33970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=33970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=33970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}