{"id":2297,"date":"2017-12-08T06:50:01","date_gmt":"2017-12-08T06:50:01","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2297"},"modified":"2020-01-09T09:46:15","modified_gmt":"2020-01-09T09:46:15","slug":"command-not-found-with-visudo","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/command-not-found-with-visudo\/","title":{"rendered":"Command Not Found With Visudo"},"content":{"rendered":"<p><strong>scmuser created the topic: command not found with visudo<\/strong><br \/>\nHi,<\/p>\n<p>I want to edit visudo and include one user for running apache but when i type following command as a user&#8221;root&#8221;<br \/>\nvisudo<\/p>\n<p>i get following error&#8230;<br \/>\ncommand not found..<\/p>\n<p>P.S: I have tried to edit directly \/etc\/sudoers but it was not allowed.<\/p>\n<p><strong>rajeshkumar replied the topic: Re: command not found with visudo<\/strong><\/p>\n<p>Try with this options&#8230;<br \/>\nsu &#8211;<br \/>\nvisudo<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>scmuser replied the topic: Re: command not found with visudo<\/strong><br \/>\nI am getting following error&#8230; when login as a normal users&#8230; and run following command..<br \/>\nsudo .\/apachectl start<\/p>\n<p>i get following error&#8230;.<\/p>\n<p>USER is not in the sudoers file. This incident will be reported.<\/p>\n<p><strong>rajeshkumar replied the topic: Re: command not found with visudo<\/strong><br \/>\nNormal users is not having permission to execute &#8220;sudo&#8221; command..<\/p>\n<p>you will have to do the following&#8230;<\/p>\n<p>Login as a root<br \/>\nsu root<\/p>\n<p>password: XXXXX<\/p>\n<p><code>su - <\/p>\n<p>visudo<\/code><\/p>\n<p>Add the following line in sudoers file&#8230;<\/p>\n<p># User privilege specification<br \/>\nroot ALL=(ALL) ALL<br \/>\nrajesh ALL=(ALL) ALL &#8211;<br \/>\nThis was added by me&#8230;<\/p>\n<p>and then &#8220;rajesh&#8221; can execute any command with sudo<\/p>\n<p>Regards,<br \/>\nRajesh<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: command not found with visudo Hi, I want to edit visudo and include one user for running apache but when i type following command as a&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[477],"class_list":["post-2297","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-visudo"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2297"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2297\/revisions"}],"predecessor-version":[{"id":2298,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2297\/revisions\/2298"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}