{"id":521,"date":"2012-07-20T16:29:57","date_gmt":"2012-07-20T16:29:57","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=521"},"modified":"2017-05-04T07:30:49","modified_gmt":"2017-05-04T02:00:49","slug":"providing-sudo-privilege-for-a-group","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/providing-sudo-privilege-for-a-group\/","title":{"rendered":"Providing sudo privilege for a group."},"content":{"rendered":"<p>Sometimes, you would need to give sudo privilege to many users. For providing sudo privilege for a single user, refer the following post.<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8211;<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"RZ2YTEiW4Y\"><p><a href=\"https:\/\/pheonixsolutions.com\/blog\/wheel-user-to-become-as-root-su-without-password\/\">Wheel user to become as root (su -) without password<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Wheel user to become as root (su -) without password&#8221; &#8212; PHEONIXSOLUTIONS\" src=\"https:\/\/pheonixsolutions.com\/blog\/wheel-user-to-become-as-root-su-without-password\/embed\/#?secret=RJfK5CKJAb#?secret=RZ2YTEiW4Y\" data-secret=\"RZ2YTEiW4Y\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&#8212;&#8211;<\/p>\n<p>&nbsp;<\/p>\n<p>For providing sudo privilege for many users, create a group and add all the users in that group. So, if we give sudo privilege for that group then all the users will get the sudo privilege.<\/p>\n<p>The following guidelines will help you to perform the above mentioned task.<\/p>\n<p>+ Creating a user with group.<\/p>\n<p><code>useradd -G testgroup username<\/code>1<\/p>\n<p><code>useradd -G testgroup username<\/code>2<\/p>\n<p>Simlarly, you can add multiple users to the group.<\/p>\n<p>Now, adding the group to the sudoers file.<\/p>\n<p>&nbsp;<\/p>\n<p><code>visudo<\/code><\/p>\n<p>Add the following content in that file. You will have to change the groupname with your own group name.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">%testgroup\u00a0 ALL=(ALL) \u00a0NOPASSWD: ALL<\/pre>\n<p>&nbsp;<\/p>\n<p>NOPASSWD is used to login to the server without asking for the password.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, you would need to give sudo privilege to many users. For providing sudo privilege for a single user, refer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[252,261,251],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-group","tag-linux","tag-sudo","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phns3A-8p","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}