<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2981574586748860278</id><updated>2024-10-24T20:50:02.217-07:00</updated><category term="Linux"/><category term="backup"/><category term="rsync"/><category term="security"/><category term="sudo"/><title type='text'>Simple Command Line tricks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://simpleclitricks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2981574586748860278/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://simpleclitricks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00426401885762284041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2981574586748860278.post-3591422765619975419</id><published>2012-06-13T11:37:00.001-07:00</published><updated>2012-06-13T11:37:33.231-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="sudo"/><title type='text'>Allow sudo to run any command as another non-privileged user</title><content type='html'>Ever need to have the ability to run sudo to trigger a command as another non-root user?&lt;br /&gt;
&lt;br /&gt;
Give this a try sometime:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;icinga&amp;nbsp;ALL = (ubuntu) NOPASSWD:ALL&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
This allows the user icinga to run anything it wants as ubuntu without asking for a password. You trigger this by having icinga trigger the command like:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sudo -u ubuntu -i /home/ubuntu/bin/awesome_script.sh&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://simpleclitricks.blogspot.com/feeds/3591422765619975419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://simpleclitricks.blogspot.com/2012/06/allow-sudo-to-run-any-command-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2981574586748860278/posts/default/3591422765619975419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2981574586748860278/posts/default/3591422765619975419'/><link rel='alternate' type='text/html' href='http://simpleclitricks.blogspot.com/2012/06/allow-sudo-to-run-any-command-as.html' title='Allow sudo to run any command as another non-privileged user'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00426401885762284041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2981574586748860278.post-57402251124134982</id><published>2012-06-13T11:18:00.000-07:00</published><updated>2012-06-13T11:37:56.532-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="rsync"/><title type='text'>Image systems via rsync</title><content type='html'>&lt;br /&gt;
In case you ever need to, say, back up a system to a massive fileserver you have lying around, try this:&lt;br /&gt;
&lt;br /&gt;
Client:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;gzip /dev/sda | nc myserver 33333&lt;/span&gt;&lt;/blockquote&gt;
Server:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;nc -l 33333 &amp;gt; foo-laptop-2012-06-image.gz&lt;/span&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://simpleclitricks.blogspot.com/feeds/57402251124134982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://simpleclitricks.blogspot.com/2012/06/image-systems-via-rsync.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2981574586748860278/posts/default/57402251124134982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2981574586748860278/posts/default/57402251124134982'/><link rel='alternate' type='text/html' href='http://simpleclitricks.blogspot.com/2012/06/image-systems-via-rsync.html' title='Image systems via rsync'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00426401885762284041</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>