{"id":1118,"date":"2018-03-20T08:47:08","date_gmt":"2018-03-20T08:47:08","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1118"},"modified":"2018-03-20T08:47:24","modified_gmt":"2018-03-20T08:47:24","slug":"adding-user-sudo-access-using-visudo","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2018\/03\/20\/adding-user-sudo-access-using-visudo\/","title":{"rendered":"Adding a User with Sudo Access using visudo"},"content":{"rendered":"<p>Use the command visudo to access the \/etc\/sudoers file.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvisudo\r\n<\/pre>\n<p>Uncomment this line:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n## Allows people in group wheel to run all commands\r\n# %wheel        ALL=(ALL)       ALL\r\n<\/pre>\n<p>So it looks like:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n## Allows people in group wheel to run all commands\r\n %wheel        ALL=(ALL)       ALL\r\n<\/pre>\n<p>Save the file then<\/p>\n<p>Run this command for your user<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nusermod -aG wheel usernameforsudoaccesshere\r\n<\/pre>\n<p>Your done.<\/p>\n<p>But test it<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsu usernamewithsudoaccess\r\nsudo yum history\r\n<\/pre>\n<p>Any root only command is a good enough test for this. The command should run succesfully after re-providing your users password for sudo access.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use the command visudo to access the \/etc\/sudoers file. visudo Uncomment this line: ## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL So it looks like: ## Allows people in group wheel to run all &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2018\/03\/20\/adding-user-sudo-access-using-visudo\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,19,98,10,9,20],"tags":[],"class_list":["post-1118","post","type-post","status-publish","format-standard","hentry","category-automation","category-bash","category-centos","category-filesystem","category-linux","category-webhosting"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1118"}],"version-history":[{"count":2,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1118\/revisions"}],"predecessor-version":[{"id":1120,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1118\/revisions\/1120"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}