{"id":315,"date":"2019-07-18T22:08:56","date_gmt":"2019-07-18T22:08:56","guid":{"rendered":"http:\/\/mohammedlakkadshaw.com\/blog\/?p=315"},"modified":"2019-07-18T22:08:56","modified_gmt":"2019-07-18T22:08:56","slug":"disable-password-prompt-when-running-sudo-via-ssh","status":"publish","type":"post","link":"https:\/\/mohammedlakkadshaw.com\/blog\/disable-password-prompt-when-running-sudo-via-ssh.html","title":{"rendered":"Disable password prompt when running sudo via SSH"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently I came across a problem. I created a deploy script that would SSH into the server and run a bunch of commands, and some of those commands required sudo, but when running commands as sudo presented a password prompt, which was a problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I solved this by updating the sudoers file in ubuntu. If you ever face this problem all you have to do it update the file \/etc\/sudoers on your server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/sudoers<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add this line to the end of the file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ubuntu ALL=(ALL) NOPASSWD: ALL<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it!  Feel free to comment if you have any questions or suggestions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I came across a problem. I created a deploy script that would SSH into the server and run a bunch of commands, and some of those commands required sudo, but when running commands as sudo presented a password prompt, which was a problem. I solved this by updating the sudoers file in ubuntu. If [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":0,"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"wp:attachment":[{"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohammedlakkadshaw.com\/blog\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}