<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Bash fun</title>
	<atom:link href="http://radu.cotescu.com/2009/06/15/bash-fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://radu.cotescu.com/2009/06/15/bash-fun/</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 08:30:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Florin</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-2/#comment-2524</link>
		<dc:creator>Florin</dc:creator>
		<pubDate>Fri, 21 May 2010 19:14:59 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-2524</guid>
		<description>Having fun on windows: here&#039;s how: http://forum.codecall.net/classes-code-snippets/13036-cowsay-c-version.html</description>
		<content:encoded><![CDATA[<p>Having fun on windows: here&#8217;s how: <a href="http://forum.codecall.net/classes-code-snippets/13036-cowsay-c-version.html" rel="nofollow">http://forum.codecall.net/classes-code-snippets/13036-cowsay-c-version.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-2/#comment-471</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Mon, 27 Jul 2009 04:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-471</guid>
		<description>I solved it. Thank you again Radu for your time and help. Please feel free to delete my non helpful post lol. I wouldn&#039;t be offended.</description>
		<content:encoded><![CDATA[<p>I solved it. Thank you again Radu for your time and help. Please feel free to delete my non helpful post lol. I wouldn&#8217;t be offended.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-2/#comment-470</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Sun, 26 Jul 2009 10:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-470</guid>
		<description>sorry, didn&#039;t post that one as it brought me back to original post:
sudo su
[sudo] password for myname: 
*****:/home/myname# cowsay -f tux I see you &gt; /dev/pts/1
bash: cowsay: command not found

Sorry, can&#039;t send you money, but can send Thank Yous&#039; here :D 
(I know not the same :(</description>
		<content:encoded><![CDATA[<p>sorry, didn&#8217;t post that one as it brought me back to original post:<br />
sudo su<br />
[sudo] password for myname:<br />
*****:/home/myname# cowsay -f tux I see you &gt; /dev/pts/1<br />
bash: cowsay: command not found</p>
<p>Sorry, can&#8217;t send you money, but can send Thank Yous&#8217; here <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
(I know not the same <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radu</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-468</link>
		<dc:creator>Radu</dc:creator>
		<pubDate>Sun, 26 Jul 2009 09:01:36 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-468</guid>
		<description>Yeah... I&#039;ve got two ideas. First issue &lt;code&gt;who&lt;/code&gt; in a terminal to see who is logged in and where. Then do what Tudor has shown you. Afterwards maybe you can send me some money for support. :P</description>
		<content:encoded><![CDATA[<p>Yeah&#8230; I&#8217;ve got two ideas. First issue <code>who</code> in a terminal to see who is logged in and where. Then do what Tudor has shown you. Afterwards maybe you can send me some money for support. <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-466</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Sun, 26 Jul 2009 04:09:10 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-466</guid>
		<description>I&#039;m back with a working sudo :D
sudo /etc/init.d/apache2 reload
[sudo] password for myname: 
Reloading web server config: apache2.

But cowsay still can&#039;t speak to another user. I&#039;ve tried a variety of cmds:
sudo su cowsay -f moose I see you &gt; /dev/pts/2
-bash: /dev/pts/2: Permission denied

sudo su cowsay -f moose I see you &gt; sudo /dev/pts/2
su: invalid option -- f
Usage: su [options] [LOGIN]

sudo su cowsay -f moose I see you &gt; sudo su /dev/pts/2
su: invalid option -- f
Usage: su [options] [LOGIN]

sudo cowsay -f moose I see you &gt; /dev/pts/2
-bash: /dev/pts/2: Permission denied

sudo cowsay -f moose I see you &gt; sudo /dev/pts/2
sudo: cowsay: command not found

cowsay -f moose I see you &gt; sudo su /dev/pts/2
(no reply, and it didn&#039;t say to user 2)

Any ideas? Thank you :D</description>
		<content:encoded><![CDATA[<p>I&#8217;m back with a working sudo <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
sudo /etc/init.d/apache2 reload<br />
[sudo] password for myname:<br />
Reloading web server config: apache2.</p>
<p>But cowsay still can&#8217;t speak to another user. I&#8217;ve tried a variety of cmds:<br />
sudo su cowsay -f moose I see you &gt; /dev/pts/2<br />
-bash: /dev/pts/2: Permission denied</p>
<p>sudo su cowsay -f moose I see you &gt; sudo /dev/pts/2<br />
su: invalid option &#8212; f<br />
Usage: su [options] [LOGIN]</p>
<p>sudo su cowsay -f moose I see you &gt; sudo su /dev/pts/2<br />
su: invalid option &#8212; f<br />
Usage: su [options] [LOGIN]</p>
<p>sudo cowsay -f moose I see you &gt; /dev/pts/2<br />
-bash: /dev/pts/2: Permission denied</p>
<p>sudo cowsay -f moose I see you &gt; sudo /dev/pts/2<br />
sudo: cowsay: command not found</p>
<p>cowsay -f moose I see you &gt; sudo su /dev/pts/2<br />
(no reply, and it didn&#8217;t say to user 2)</p>
<p>Any ideas? Thank you <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-463</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Sat, 25 Jul 2009 02:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-463</guid>
		<description>Sorry Radu; stuck :( and very frustrated.
This is what I have done and the edited replies. I posted here: http://pastebin.com/m45312224
as worried too long for here and felt like it was ruining your nice cosway post :D
I&#039;m also very nervous that I&#039;m messing with the host files. Since I only have remote access to this box it would be impossible to fix it if it went off line because I mess something up real good.

Thank you very much! :) 

PS. I didn&#039;t mean to come here to have you fix all of this for me, sorry...if you want me to take it to a forum to fix, I understand :) Thank you again Radu! :D</description>
		<content:encoded><![CDATA[<p>Sorry Radu; stuck <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  and very frustrated.<br />
This is what I have done and the edited replies. I posted here: <a href="http://pastebin.com/m45312224" rel="nofollow">http://pastebin.com/m45312224</a><br />
as worried too long for here and felt like it was ruining your nice cosway post <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
I&#8217;m also very nervous that I&#8217;m messing with the host files. Since I only have remote access to this box it would be impossible to fix it if it went off line because I mess something up real good.</p>
<p>Thank you very much! <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>PS. I didn&#8217;t mean to come here to have you fix all of this for me, sorry&#8230;if you want me to take it to a forum to fix, I understand <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thank you again Radu! <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-461</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Fri, 24 Jul 2009 06:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-461</guid>
		<description>Thank you Radu. I didn&#039;t know that. All along I thought su &amp; sudo were thee same thing just different cmd&#039;s for different OS&#039;s. Wow ok from cowsay to fixing this lol...

After some digging I found that I didn&#039;t have &#039;sudo&#039; (http://www.binbash.eu/linux/58-debian-etch-notes) so I did: 
&lt;pre lang=&quot;bash&quot;&gt;
aptitude install sudo 
No /etc/sudoers found... creating one for you.
&lt;/pre&gt;
Ok so now I try (as a user and as root) sudo
reply same for both: 
&lt;pre lang=&quot;bash&quot;&gt;
sudo: unable to resolve host PTy990499a.servername.com
&lt;/pre&gt;
(*PTy990499a.servername.com I have changed, it&#039;s not the real server name, just similar)
&lt;pre lang=&quot;bash&quot;&gt;
cat /etc/hostname
&lt;/pre&gt;
simply has PTy990499a.servername.com and this hostname can not be resolved (Dns unable to resolve..). Where as the servername.com part can be resolved, correctly. And the PTy990499a part is what I see on the console on each line, for example:
&lt;pre lang=&quot;bash&quot;&gt;
PTy990499a:~# cat /etc/hostname
PTy990499a.servername.com
PTy990499a:~# cat /etc/hosts
127.0.0.1       localhost
200/66.123.66   PTy990499a.servername.com.servername.com  PTy990499a

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
&lt;/pre&gt;

(*200/66.123.66 also not the real IP)

So I&#039;m going to try to fix this myself, please don&#039;t give away any clues :) and see if I can do this myself. Just a crazy busy day here. Will post when done or stuck :D
Thank you again Radu!</description>
		<content:encoded><![CDATA[<p>Thank you Radu. I didn&#8217;t know that. All along I thought su &amp; sudo were thee same thing just different cmd&#8217;s for different OS&#8217;s. Wow ok from cowsay to fixing this lol&#8230;</p>
<p>After some digging I found that I didn&#8217;t have &#8216;sudo&#8217; (<a href="http://www.binbash.eu/linux/58-debian-etch-notes" rel="nofollow">http://www.binbash.eu/linux/58-debian-etch-notes</a>) so I did:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> 
No <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sudoers found... creating one <span style="color: #000000; font-weight: bold;">for</span> you.</pre></div></div>

<p>Ok so now I try (as a user and as root) sudo<br />
reply same for both:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span>: unable to resolve host PTy990499a.servername.com</pre></div></div>

<p>(*PTy990499a.servername.com I have changed, it&#8217;s not the real server name, just similar)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">hostname</span></pre></div></div>

<p>simply has PTy990499a.servername.com and this hostname can not be resolved (Dns unable to resolve..). Where as the servername.com part can be resolved, correctly. And the PTy990499a part is what I see on the console on each line, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PTy990499a:~<span style="color: #666666; font-style: italic;"># cat /etc/hostname</span>
PTy990499a.servername.com
PTy990499a:~<span style="color: #666666; font-style: italic;"># cat /etc/hosts</span>
127.0.0.1       localhost
<span style="color: #000000;">200</span><span style="color: #000000; font-weight: bold;">/</span>66.123.66   PTy990499a.servername.com.servername.com  PTy990499a
&nbsp;
<span style="color: #666666; font-style: italic;"># The following lines are desirable for IPv6 capable hosts</span>
::<span style="color: #000000;">1</span>     ip6-localhost ip6-loopback
fe00::<span style="color: #000000;">0</span> ip6-localnet
ff00::<span style="color: #000000;">0</span> ip6-mcastprefix
ff02::<span style="color: #000000;">1</span> ip6-allnodes
ff02::<span style="color: #000000;">2</span> ip6-allrouters
ff02::<span style="color: #000000;">3</span> ip6-allhosts</pre></div></div>

<p>(*200/66.123.66 also not the real IP)</p>
<p>So I&#8217;m going to try to fix this myself, please don&#8217;t give away any clues <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and see if I can do this myself. Just a crazy busy day here. Will post when done or stuck <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Thank you again Radu!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radu</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-455</link>
		<dc:creator>Radu</dc:creator>
		<pubDate>Thu, 23 Jul 2009 12:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-455</guid>
		<description>Try &lt;code&gt;man sudo&lt;/code&gt; and see the difference between those options. If you try to use &lt;code&gt;sudo&lt;/code&gt; as root, well that&#039;s not possible. &lt;code&gt;sudo&lt;/code&gt; is meant only for users other than root, but they must be in the sudoers list. If you have tried &lt;code&gt;sudo&lt;/code&gt; as a regular user and found that &quot;error&quot;, you either are in the case mentioned in the previous phrase, either you have broken your hostname by not keeping consistency between &lt;code&gt;/etc/hostname&lt;/code&gt; and &lt;code&gt;/etc/hosts&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>Try <code>man sudo</code> and see the difference between those options. If you try to use <code>sudo</code> as root, well that&#8217;s not possible. <code>sudo</code> is meant only for users other than root, but they must be in the sudoers list. If you have tried <code>sudo</code> as a regular user and found that &#8220;error&#8221;, you either are in the case mentioned in the previous phrase, either you have broken your hostname by not keeping consistency between <code>/etc/hostname</code> and <code>/etc/hosts</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cowcant root</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-454</link>
		<dc:creator>cowcant root</dc:creator>
		<pubDate>Thu, 23 Jul 2009 11:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-454</guid>
		<description>Radu thank you again. 
Yes re sudo su: 
sudo su
-bash: sudo: command not found

For my Debian its su which I believe is the same thing, yes?
So for su can&#039;t cowsay 
and for user can&#039;t  /dev/pts/1

Maybe I am misunderstanding the &#039;sudo su&#039; thing? 

Re the e-mail, to be honest,  just a habit when registering isn&#039;t required. Sorry I didn&#039;t realize you had to approve each time so I have put my email this time :D</description>
		<content:encoded><![CDATA[<p>Radu thank you again.<br />
Yes re sudo su:<br />
sudo su<br />
-bash: sudo: command not found</p>
<p>For my Debian its su which I believe is the same thing, yes?<br />
So for su can&#8217;t cowsay<br />
and for user can&#8217;t  /dev/pts/1</p>
<p>Maybe I am misunderstanding the &#8216;sudo su&#8217; thing? </p>
<p>Re the e-mail, to be honest,  just a habit when registering isn&#8217;t required. Sorry I didn&#8217;t realize you had to approve each time so I have put my email this time <img src='http://static.cotescu.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radu</title>
		<link>http://radu.cotescu.com/2009/06/15/bash-fun/comment-page-1/#comment-453</link>
		<dc:creator>Radu</dc:creator>
		<pubDate>Thu, 23 Jul 2009 11:04:13 +0000</pubDate>
		<guid isPermaLink="false">http://radu.cotescu.com/?p=623#comment-453</guid>
		<description>Tudor said &lt;code&gt;sudo su&lt;/code&gt;. If you use &lt;code&gt;sudo -i&lt;/code&gt;, as I used, it won&#039;t work. For you to send that message with the exclamation mark, you just need to remove the quotes:
&lt;pre lang=&quot;bash&quot;&gt;
root@tux:/home/radu# cowsay -f sodomized I see you behind this cow! &gt; /dev/pts/0
 ____________________________
&lt; I see you behind this cow! &gt;
 ----------------------------
                      _
                     (_)
           ^__^       / 
           (oo)_____/_ 
            (__)       ) /
                &#124;&#124;----w ((
                &#124;&#124;     &#124;&#124;&gt;&gt;
&lt;/pre&gt;
The first output of the sodomized cow was from BusyBox, on my router, which does not interpret the quotes like Ubuntu does.
&lt;br /&gt;
P.S. Why are you afraid to use your email? If you use it, I wouldn&#039;t have to approve every comment you make, only the first one registered with it. I&#039;m not gonna sell it for spam...</description>
		<content:encoded><![CDATA[<p>Tudor said <code>sudo su</code>. If you use <code>sudo -i</code>, as I used, it won&#8217;t work. For you to send that message with the exclamation mark, you just need to remove the quotes:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>tux:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>radu<span style="color: #666666; font-style: italic;"># cowsay -f sodomized I see you behind this cow! &gt; /dev/pts/0</span>
 ____________________________
<span style="color: #000000; font-weight: bold;">&lt;</span> I see you behind this cow<span style="color: #000000; font-weight: bold;">!</span> <span style="color: #000000; font-weight: bold;">&gt;</span>
 <span style="color: #660033;">----------------------------</span>
                      _
                     <span style="color: #7a0874; font-weight: bold;">&#40;</span>_<span style="color: #7a0874; font-weight: bold;">&#41;</span>
           ^__^       <span style="color: #000000; font-weight: bold;">/</span> 
           <span style="color: #7a0874; font-weight: bold;">&#40;</span>oo<span style="color: #7a0874; font-weight: bold;">&#41;</span>_____<span style="color: #000000; font-weight: bold;">/</span>_ 
            <span style="color: #7a0874; font-weight: bold;">&#40;</span>__<span style="color: #7a0874; font-weight: bold;">&#41;</span>       <span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">/</span>
                <span style="color: #000000; font-weight: bold;">||</span>----w <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>
                <span style="color: #000000; font-weight: bold;">||</span>     <span style="color: #000000; font-weight: bold;">||&gt;&gt;</span></pre></div></div>

<p>The first output of the sodomized cow was from BusyBox, on my router, which does not interpret the quotes like Ubuntu does.<br />
<br />
P.S. Why are you afraid to use your email? If you use it, I wouldn&#8217;t have to approve every comment you make, only the first one registered with it. I&#8217;m not gonna sell it for spam&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk (user agent is rejected)
Page Caching using disk (enhanced) (user agent is rejected)
Object Caching 501/510 objects using disk
Content Delivery Network via static.cotescu.com

Served from: radu.cotescu.com @ 2010-09-09 21:05:04 -->