<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The eternal fight between admins and computers</title>
	<atom:link href="http://anothersysadmin.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anothersysadmin.wordpress.com</link>
	<description>(and very often users, as well)</description>
	<lastBuildDate>Thu, 19 Jan 2012 23:16:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='anothersysadmin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The eternal fight between admins and computers</title>
		<link>http://anothersysadmin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://anothersysadmin.wordpress.com/osd.xml" title="The eternal fight between admins and computers" />
	<atom:link rel='hub' href='http://anothersysadmin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Apache2: seg fault or similar nasty error detected in the parent process</title>
		<link>http://anothersysadmin.wordpress.com/2011/12/23/apache2-seg-fault-or-similar-nasty-error-detected-in-the-parent-process/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/12/23/apache2-seg-fault-or-similar-nasty-error-detected-in-the-parent-process/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 08:20:01 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web systems]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=323</guid>
		<description><![CDATA[If you happen to see a message like this seg fault or similar nasty error detected in the parent process when reloading Apache2, and if you&#8217;re using PHP5 through mod_php5, then it may be related to having an extension loaded via php.ini and not really present on the system. It was my case with a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=323&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you happen to see a message like this</p>
<p><code>seg fault or similar nasty error detected in the parent process</code></p>
<p>when reloading Apache2, and if you&#8217;re using PHP5 through mod_php5, then it may be related to having an extension loaded via php.ini and not really present on the system. It was my case with a redis extension (redis.so) and I banged my head a day before finding it.</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/apache/'>Apache</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>, <a href='http://anothersysadmin.wordpress.com/category/web-systems/'>Web systems</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/323/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=323&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/12/23/apache2-seg-fault-or-similar-nasty-error-detected-in-the-parent-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>HOWTO: install puppet-dashboard on Debian Squeeze</title>
		<link>http://anothersysadmin.wordpress.com/2011/09/08/howto-install-puppet-dashboard-on-debian-squeeze/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/09/08/howto-install-puppet-dashboard-on-debian-squeeze/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 13:40:05 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Puppet]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=318</guid>
		<description><![CDATA[This should apply to Ubuntu Server as well (10.10, 11.04) but it&#8217;s tested to work 100% on Debian Squeeze 6.0. Puppet Dashboard is a neat piece of software really useful if you ara managing a good number of hosts without Puppet. First of all, install the required deps: # aptitude install ruby rake dbconfig-common libdbd-mysql-ruby [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=318&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This should apply to Ubuntu Server as well (10.10, 11.04) but it&#8217;s tested to work 100% on Debian Squeeze 6.0.<br />
<a href="http://puppetlabs.com/puppet/related-projects/dashboard/" title="Puppet Dashboard" target="_blank">Puppet Dashboard</a> is a neat piece of software really useful if you ara managing a good number of hosts without Puppet.</p>
<p>First of all, install the required deps:<br />
<code><br />
# aptitude install ruby rake dbconfig-common libdbd-mysql-ruby mysql-client rubygems libhttpclient-ruby1.8<br />
</code><br />
you&#8217;ll probably have lots of them already installed if you are running Puppet master on the same host (which by the way is not mandatory).<br />
Then, download and install the deb package:<br />
<code><br />
# wget http://downloads.puppetlabs.com/dashboard/puppet-dashboard_1.2.0-1_all.deb<br />
# dpkg -i puppet-dashboard_1.2.0-1_all.deb<br />
</code><br />
Enable the daemon editing the default file <em>/etc/default/puppet-dashboard</em> and then customize your database definition by editing <em>/etc/puppet-dashboard/database.yml</em> which should looks something like  this:<br />
<code><br />
production:<br />
  database: puppet_dashboard<br />
  host: your.database.host<br />
  username: puppet_dashboard<br />
  password: secret_password<br />
  encoding: utf8<br />
  adapter: mysql<br />
</code></p>
<p>if you plan to use MySQL as a backend. Remember to create the database and grant the appropriate privileges to the user</p>
<p><code>GRANT ALL PRIVILEGES ON puppet_dashboard.* TO 'puppet_dashboard'@'%' IDENTIFIED BY 'secret_password';</code></p>
<p>Now we have to populate the database, Rails way<br />
<code><br />
# cd /usr/share/puppet-dashboard/<br />
# rake RAILS_ENV=production db:migrate<br />
</code></p>
<p>Now you can start <em>/etc/init.d/puppet-dashboard</em> and <em>/etc/init.d/puppet-dashboard-workers</em> and you should be already able to access http://your-host.yourdomain.tld:3000 and see the Puppet Dashboard.<br />
You just have to do two thing more before you can see any actual data in it: enable report sending in the Puppet clients and tell Puppet Master to pull those reports to the Dashboard via HTTP.</p>
<p>So, edit /etc/puppet.pupept.conf on the clients (I suggest you to do it via puppet if you do not already have this setting in it) and add<br />
<code><br />
[agent]<br />
    # ... whatever you already have<br />
    report=true<br />
</code></p>
<p>and on the Master side<br />
<code><br />
[master]<br />
    # ... whatever you already have<br />
    reports = store, http<br />
    reporturl = http://your-host.yourdomain.tld:3000/reports/upload<br />
</code></p>
<p>That&#8217;s it!</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/linux/debian/'>Debian</a>, <a href='http://anothersysadmin.wordpress.com/category/howtos/'>Howtos</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/puppet/'>Puppet</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/ubuntu/'>Ubuntu</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=318&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/09/08/howto-install-puppet-dashboard-on-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>esx-halt: shutdown VMWare ESXi from ssh</title>
		<link>http://anothersysadmin.wordpress.com/2011/09/05/esx-halt-shutdown-esxi-from-ssh/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/09/05/esx-halt-shutdown-esxi-from-ssh/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 20:53:21 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[ESXi]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell scripts]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=312</guid>
		<description><![CDATA[Long time no post &#8211; again &#8211; I hope this is the last time and I can be a little more prolific :) Anyway today I want to share a little script that I hacked to shutdown an ESXi (with the free license) host remotely, shutting down in a safely form all the VMs inside [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=312&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Long time no post &#8211; again &#8211; I hope this is the last time and I can be a little more prolific :) Anyway today I want to share a little script that I hacked to shutdown an ESXi (with the free license) host remotely, shutting down in a safely form all the VMs inside it. This could be quite usefull (and in fact it&#8217;s why I wrote it), if you want to shutdown ESXi from an UPS daemon when lights go out, and you cannot afford a complete ESXi license, so you&#8217;re running the free edition.<br />
The script can be found here at GitHub</p>
<p><a href="https://github.com/vide/esx-halt" target="_blank">https://github.com/vide/esx-halt<br />
</a><br />
and it&#8217;s written in bash (I use bash4 but it should run on lesser versions too). On the server side, it works with VMWare ESXi 4.x.</p>
<p>Any question, patch or bug report are warmly welcome :)</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/esxi/'>ESXi</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/shell-scripts/'>Shell scripts</a>, <a href='http://anothersysadmin.wordpress.com/category/unix/'>Unix</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/312/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/312/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/312/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=312&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/09/05/esx-halt-shutdown-esxi-from-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>Customize the console prompt in VMWare ESXi 4.0</title>
		<link>http://anothersysadmin.wordpress.com/2011/02/11/customize-the-console-prompt-in-vmware-esxi-4-0/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/02/11/customize-the-console-prompt-in-vmware-esxi-4-0/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 09:01:33 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Oneliner]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=300</guid>
		<description><![CDATA[The default console prompt of VMWare ESXi 4.0 really sucks, it&#8217;s black&#38;white, it gives no info about the host you are connected to and if you have more than one host this is becomes quickly an headache. So, how do you change it? Pretty easy: echo 'export PS1="\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ "' &#62; $HOME/.profile then exit from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=300&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The default console prompt of VMWare ESXi 4.0 really sucks, it&#8217;s black&amp;white, it gives no info about the host you are connected to and if you have more than one host this is becomes quickly an headache.<br />
So, how do you change it? Pretty easy:</p>
<p><code><br />
echo 'export PS1="\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\]\$ "' &gt; $HOME/.profile<br />
</code><br />
then exit from the shell (ssh or local) and enter again and you will have a pretty nice colored console prompt :)</p>
<p><strong>EDIT</strong>: ok, it seems that I cannot post &#8220;backslash zero&#8221; with WordPress. so please put before any &#8220;33&#8243; in this string &#8220;backslash zero&#8221; (the symbol and the number, not the two words). Thanks to Daniel for pointing this out. If you know a way to solve this, please share it :)</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/oneliner/'>Oneliner</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>, <a href='http://anothersysadmin.wordpress.com/category/vmware/'>VMWare</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=300&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/02/11/customize-the-console-prompt-in-vmware-esxi-4-0/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>TCP sockets in your shell</title>
		<link>http://anothersysadmin.wordpress.com/2011/02/10/tcp-sockets-in-your-shell/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/02/10/tcp-sockets-in-your-shell/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 09:36:55 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oneliner]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=295</guid>
		<description><![CDATA[Usually I always used netcat to send TCP data but there&#8217;s another way, builtin in bash. You can send the string &#8220;Hello world&#8221; to 192.168.1.1 on port 15123 using: echo "Hello world" &#62; /dev/tcp/192.168.1.1/15123 Simple, quick and effective :) Note: thanks to Waldner for pointing out that it&#8217;s built-in in bash and there&#8217;s no need for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=295&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Usually I always used netcat to send TCP data but there&#8217;s another way, builtin in bash. You can send the string &#8220;Hello world&#8221; to 192.168.1.1 on port 15123 using:</p>
<pre>echo "Hello world" &gt; /dev/tcp/192.168.1.1/15123</pre>
<p>Simple, quick and effective :)</p>
<p>Note: thanks to Waldner for pointing out that it&#8217;s built-in in bash and there&#8217;s no need for an &#8220;mknode&#8221;</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/linux/debian/'>Debian</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/oneliner/'>Oneliner</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=295&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/02/10/tcp-sockets-in-your-shell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>A handful of bash tips &#8211; part 1</title>
		<link>http://anothersysadmin.wordpress.com/2011/01/25/a-handful-of-bash-tips-part-1/</link>
		<comments>http://anothersysadmin.wordpress.com/2011/01/25/a-handful-of-bash-tips-part-1/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 17:13:35 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=281</guid>
		<description><![CDATA[During last weeks I&#8217;ve been doing lot of scripting (a user management system for our internal infrastructure which is formed by lots of services) and it ended being something like 3000 lines of bash code. Not too much but probably this is my greatest experience til now with bash :) So, I&#8217;ve learnt a couple [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=281&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During last weeks I&#8217;ve been doing lot of scripting (a user management system for our internal infrastructure which is formed by lots of services) and it ended being something like 3000 lines of bash code. Not too much but probably this is my greatest experience til now with bash :)</p>
<p>So, I&#8217;ve learnt a couple of things with this project and I&#8217;d like to share some tips and lessons learnt during the process. I&#8217;m not a bash guru, and if you find something could be improved, feel free to leave a comment.</p>
<h3>Stand on the giant&#8217;s shoulders</h3>
<p>You can find lot of docs on bash, like the Advanced Bash Scripting Guide, but these are better in my opinion</p>
<ul>
<li><a href="http://mywiki.wooledge.org/BashGuide/">http://mywiki.wooledge.org/BashGuide/</a></li>
<li><a href="http://mywiki.wooledge.org/BashPitfalls/">http://mywiki.wooledge.org/BashPitfalls/</a></li>
</ul>
<p>and the #bash IRC channel on irc.freenode.net. Just lurking the conversations will teach you lot of things</p>
<h3>Use the latest and greatest bash version</h3>
<p>This means right now to use Bash4. I mean, if you are using a shell to script things, use the latest version and take advantage of all its features! Really, I don&#8217;t care about portability, I script for my systems where I have full control. I&#8217;ve upgraded a Debian box from Lenny to Squeeze just to get bash4, go figure :) Obviously if you cannot update easily or you need to be portable, don&#8217;t fall in the bashisms trap, try to be as POSIX as possible and discard my tip(s).</p>
<h3>Quote everything. I mean, really <span style="text-decoration:underline;">everything</span></h3>
<p>If you are used to the simple $VARIABLE form, drop it right now and use always &#8220;${VARIABLE}&#8221;. It&#8217;s cleaner, it&#8217;s safer, it supports white spaces in the variable content etc.</p>
<h3>Only the first quote matters</h3>
<p>I&#8217;ve seen very often (and I was using this too) escaped quote chars when creating queries or strings to be passed somewhere. For example</p>
<pre>QUERY="SELECT * FROM foo WHERE name=\"${VAR}\";"</pre>
<p>because you fear that ${VAR} won&#8217;t be expanded if single quoted. But what really matters in this case is the first double quote. bash will interpret every other single quote before the closing double quote as a normal char, and pass it to the next hop. So this is perfectly right:</p>
<pre>QUERY="SELECT * FROM foo WHERE name='${VAR}';"</pre>
<p>${VAR} will be expanded as expected. This is quite useful if calling another script with parameters via ssh, and leave a cleaner syntax (I hate escaping chars)</p>
<pre>ssh user@host "/path/to/script 'foobar goes first' 'second parameter'"</pre>
<h3>Use shift when receiving parameters</h3>
<p>Probably you are already doing this, anyway it&#8217;s a lesson learnt in these days. If you&#8217;re are passing parameters to functions/other scripts instead of</p>
<pre>PARAM1="${1}"
PARAM2="${2}"
# etc</pre>
<p>use the power of shift. If you are going to change your mind about those parameters, you won&#8217;t need to rename everything.</p>
<pre>PARAM1="${1}"
shift 1
PARAM2="${1}"
shift 1
# etc</pre>
<h3>Use input redirection instead of pipes when possible</h3>
<p>A classic example</p>
<pre>cat /path/to/mylst|while read foo
do
# do somtething with foo
done</pre>
<p>should be</p>
<pre>while read foo
# do something with foo
done &lt; /path/to/mylist</pre>
<p>why? becaus<strong>e </strong>input redirection<strong> it is meant to do that!</strong></p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/shell-scripts/'>Shell scripts</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>, <a href='http://anothersysadmin.wordpress.com/category/unix/'>Unix</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/281/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/281/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/281/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=281&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2011/01/25/a-handful-of-bash-tips-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert pwdLastSet to a human readable date</title>
		<link>http://anothersysadmin.wordpress.com/2010/10/22/convert-pwdlastset-to-a-human-readable-date/</link>
		<comments>http://anothersysadmin.wordpress.com/2010/10/22/convert-pwdlastset-to-a-human-readable-date/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 11:53:13 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oneliner]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[pwdLastSet]]></category>
		<category><![CDATA[Shell scripts]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=277</guid>
		<description><![CDATA[Here it is a simple (and a bit hacky, I know) one-liner for bash shell (even under Windows if you are using Cygwin) to convert the cryptic pwdLastSet timestamp of Active Directory (which represent when a user has changed the last time his/her AD password) D=128457325992343750; date -d "01/01/1601 UTC $(let D=D/10000000; echo $D) seconds" [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=277&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here it is a simple (and a bit hacky, I know) one-liner for bash shell (even under Windows if you are using Cygwin) to convert the cryptic pwdLastSet timestamp of Active Directory (which represent when a user has changed the last time his/her AD password)</p>
<p><code><br />
D=128457325992343750; date -d "01/01/1601 UTC $(let D=D/10000000; echo $D) seconds"<br />
</code></p>
<p>where the very large number after the first D= it&#8217;s your pwdLastSet value. This strange timestamp it&#8217;s a 1/100 of a nanosecond (so, it&#8217;s 1/10^7 seconds) and the ticks are counted from January 1st, 1601. Don&#8217;t ask me why, probably they didn&#8217;t like the Epoch time :)</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/windows/active-directory/'>Active Directory</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/oneliner/'>Oneliner</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=277&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2010/10/22/convert-pwdlastset-to-a-human-readable-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>Disable directory listing in Apache with Debian</title>
		<link>http://anothersysadmin.wordpress.com/2010/08/25/disable-directory-listing-in-apache-with-debian/</link>
		<comments>http://anothersysadmin.wordpress.com/2010/08/25/disable-directory-listing-in-apache-with-debian/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 09:13:43 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oneliner]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=271</guid>
		<description><![CDATA[If you find one of your servers with the ugly directory listing enabled, there&#8217;s a quick way to disable it in Debian # echo autoindex &#124; a2dismod # /etc/init.d/apache2 restart For other Apache installations in other distro, you can simple find the Autoindex option in your config file and delete it manually, then restart Apache [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=271&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you find one of your servers with the ugly directory listing enabled, there&#8217;s a quick way to disable it in Debian</p>
<p><code># echo autoindex | a2dismod<br />
# /etc/init.d/apache2 restart</code></p>
<p>For other Apache installations in other distro, you can simple find the Autoindex option in your config file and delete it manually, then restart Apache</p>
<p>EDIT: a cleaner and more elegant way to achieve the same is, as the comments section says<br />
<code><br />
# a2dismod autoindex</p>
<p>thanks :)<br />
</code></p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/apache/'>Apache</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/debian/'>Debian</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/oneliner/'>Oneliner</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/271/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/271/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/271/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=271&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2010/08/25/disable-directory-listing-in-apache-with-debian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>Note to self: accessing LVM volumes from live CD</title>
		<link>http://anothersysadmin.wordpress.com/2010/06/03/note-to-self-accessing-lvm-volumes-from-live-cd/</link>
		<comments>http://anothersysadmin.wordpress.com/2010/06/03/note-to-self-accessing-lvm-volumes-from-live-cd/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 14:13:54 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oneliner]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[fixes]]></category>
		<category><![CDATA[lvm]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=261</guid>
		<description><![CDATA[If you have a Linux machine with LVM volumes on it, and you need to boot it from a live CD (for example SysRescueCD) and you wonder where your volumes are, just issue (in an LVM enabled system, of course) # vgchange -a y and your volumes will be available under /dev/$VOLUME-GROUP-NAME or under /dev/mapper [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=261&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If  you have a Linux machine with LVM volumes on it, and you need to boot it from a live CD (for example SysRescueCD) and you wonder where your volumes are, just issue (in an LVM enabled system, of course)</p>
<p><code><br />
# vgchange -a y<br />
</code></p>
<p>and your volumes will be available under /dev/$VOLUME-GROUP-NAME or under /dev/mapper</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/fixes/'>Fixes</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/oneliner/'>Oneliner</a>, <a href='http://anothersysadmin.wordpress.com/category/software/'>Software</a>, <a href='http://anothersysadmin.wordpress.com/category/storage/'>Storage</a>, <a href='http://anothersysadmin.wordpress.com/category/tips/'>Tips</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=261&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2010/06/03/note-to-self-accessing-lvm-volumes-from-live-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
		<item>
		<title>HOWTO: Poor man VPN in Debian/Ubuntu with OpenSSH</title>
		<link>http://anothersysadmin.wordpress.com/2010/02/26/howto-poor-man-vpn-in-debianubuntu-with-openssh/</link>
		<comments>http://anothersysadmin.wordpress.com/2010/02/26/howto-poor-man-vpn-in-debianubuntu-with-openssh/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 07:58:08 +0000</pubDate>
		<dc:creator>Vide</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://anothersysadmin.wordpress.com/?p=251</guid>
		<description><![CDATA[If you are managing a remote Linux network and you are tired of NATting or two ssh hops to enter a remote server, but OpenVPN poses too much overhead, you can use ssh tunneling to easily create a workstation-to-site VPN. I&#8217;ve tested this with Ubuntu 9.10 Karmic Koala as the workstation and Debian 5.0 Lenny [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=251&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are managing a remote Linux network and you are tired of NATting or two ssh hops to enter a remote server, but OpenVPN poses too much overhead, you can use ssh tunneling to easily create a workstation-to-site VPN.<br />
I&#8217;ve tested this with Ubuntu 9.10 Karmic Koala as the workstation and Debian 5.0 Lenny as the server, but it should work identically with older Ubuntu and Debian (both server or workstation).</p>
<p>I&#8217;ve been inspired by <a href="http://bodhizazen.net/Tutorials/VPN-Over-SSH/">these</a> <a href="http://www.debian-administration.org/articles/539">two</a> tutorials, although both didn&#8217;t work 100% for me, but joining pieces did the trick, so here I am :)</p>
<p>Software prerequisites:</p>
<ul>
<li>Standard Debian or Ubuntu</li>
<li>openssh-server on the remote side of the VPN</li>
<li>openssh-client on the local side of the VPN (your PC)</li>
</ul>
<p>Network configuration (as an example)</p>
<ul>
<li>Workstation LAN: 192.168.0.0<a href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">/24</a></li>
<li>Server LAN: 192.168.10.0/24 on eth1</li>
<li>VPN: 10.0.0.0/24</li>
<li>Remote server public address: 1.2.3.4 on eth0</li>
</ul>
<p>First of all, on the workstation generate a dedicated key (it should be a dedicated one cause the server will identify you&#8217;re going to bring up a tunnel based on the key you&#8217;re using to connect) with<br />
<code><br />
# ssh-keygen -f /root/.ssh/VPNkey -b 2048<br />
</code></p>
<p>Now edit <code>/etc/network/interfaces</code> and create a new stanza like this one (remember to change IP addresses &#8211; in bold &#8211; according to your personal network configuration)<br />
<code><br />
iface tun0 inet static<br />
        # from <em>pre-up</em> to <em>true</em> on the same line<br />
        pre-up ssh -i /root/.ssh/VPN -S /var/run/ssh-vpn-tunnel-control -M -f -w 0:0 <strong>1.2.3.4</strong> true<br />
        pre-up sleep 5<br />
        address <strong>10.1.0.2</strong><br />
        pointopoint <strong>10.1.0.1</strong><br />
        netmask <strong>255.255.255.0</strong><br />
        up route add -net <strong>192.168.10.0</strong> netmask <strong>255.255.255.0</strong> gw <strong>10.1.0.1</strong> tun0<br />
        post-down ssh -i /root/.ssh/VPN -S /var/run/ssh-vpn-tunnel-control -O exit <strong>1.2.3.4</strong><br />
</code></p>
<p>Just a copuple of notes: <code>address</code> is your VPN local endpoint address (say, your workstation) while <code>pointopoint</code> is the remote VPNaddress (your server), which are the two tunnel&#8217;s endpoints.</p>
<p>Now let&#8217;s go to the server.</p>
<p>Edit <code>/etc/ssh/sshd_server</code>, add the line<br />
<code>PermitTunnel point-to-point</code></p>
<p>and restart your sshd instance.<br />
Now edit (or create) <code>/root/.ssh/authorized_keys</code> (remember, we are on the server now, not your workstation) and add a line like<br />
<code><br />
tunnel="0",command="/sbin/ifdown tun0; /sbin/ifup tun0" ssh-rsa <strong>HERE IT GOES YOUR VPNkey.pub FROM YOUR WORKSTATION</strong><br />
</code></p>
<p>now edit <code>/etc/network/interfaces</code> and add this stanza:<br />
<code><br />
iface tun0 inet static<br />
        address <strong>10.1.0.1</strong><br />
        netmask <strong>255.255.255.0</strong><br />
        pointopoint <strong>10.1.0.2</strong><br />
        post-up /sbin/sysctl -w net.ipv4.ip_forward=1<br />
        post-up /sbin/iptables -t nat -A POSTROUTING -s <strong>10.1.0.0/24</strong> -o eth1 -j MASQUERADE<br />
        post-down /sbin/iptables -t nat -D POSTROUTING -s <strong>10.1.0.0/24</strong> -o eth1 -j MASQUERADE<br />
        post-down /sbin/sysctl -w net.ipv4.ip_forward=0<br />
</code></p>
<p>the post-up and post-down commands enable the network sharing between the VPN server endpoint and the remote LAN (it&#8217;s called masquerading), so you can access the remote LAN from your workstation and not only the remote server. Obviously you need to instruct your workstation with a dedicated static route to reach the remote LAN network, and this is the <code>route add -net </code> in your workstation config.</p>
<p>Now, bring up the tunnel on the workstation with<br />
<code># ifup tun0</code><br />
and you should be able to reach a remote server on your remote LAN, with traffic secured by OpenSSH encryption.</p>
<br />Filed under: <a href='http://anothersysadmin.wordpress.com/category/linux/debian/'>Debian</a>, <a href='http://anothersysadmin.wordpress.com/category/howtos/'>Howtos</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/'>Linux</a>, <a href='http://anothersysadmin.wordpress.com/category/networking/'>Networking</a>, <a href='http://anothersysadmin.wordpress.com/category/linux/ubuntu/'>Ubuntu</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/anothersysadmin.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/anothersysadmin.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/anothersysadmin.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=anothersysadmin.wordpress.com&amp;blog=1310142&amp;post=251&amp;subd=anothersysadmin&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://anothersysadmin.wordpress.com/2010/02/26/howto-poor-man-vpn-in-debianubuntu-with-openssh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7f83c5c93a8db32d512fd36bc4c99768?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">Vide</media:title>
		</media:content>
	</item>
	</channel>
</rss>
