{"id":3200,"date":"2016-06-10T14:15:10","date_gmt":"2016-06-10T14:15:10","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3200"},"modified":"2016-06-10T14:15:10","modified_gmt":"2016-06-10T14:15:10","slug":"add-user-grant-root-privileges-centos-6-7","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2016\/06\/10\/add-user-grant-root-privileges-centos-6-7\/","title":{"rendered":"How to Add a User and Grant Root Privileges with visudo on CentOS 6.7"},"content":{"rendered":"<p>Change to root<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n$ su -\nPassword: \n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nadduser mynewuser\n<\/pre>\n<p>Now set the password for the new user:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\npasswd mynewuser\n\n<\/pre>\n<p>Step 2: Grant Root Privileges to the User<br \/>\nFor a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nvisudo\n\n<\/pre>\n<p>Find the following code:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n## Allow root to run any commands anywhere\nroot ALL=(ALL) ALL\n\n<\/pre>\n<p>In this case, we\u2019re granting root privileges to the user mynewuser . Add the following below that code:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\nmynewuser ALL=(ALL) ALL\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Change to root $ su &#8211; Password: adduser mynewuser Now set the password for the new user: passwd mynewuser Step 2: Grant Root Privileges to the User For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor visudo Find the following code: ## Allow root to run &#8230; <a title=\"How to Add a User and Grant Root Privileges with visudo on CentOS 6.7\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2016\/06\/10\/add-user-grant-root-privileges-centos-6-7\/\" aria-label=\"Read more about How to Add a User and Grant Root Privileges with visudo on CentOS 6.7\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,11],"tags":[],"class_list":["post-3200","post","type-post","status-publish","format-standard","hentry","category-administration","category-centos6"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3200"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3200\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}