<?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/"
	>

<channel>
	<title>geek scrap &#187; Sysadmin</title>
	<atom:link href="http://geekscrap.com/categories/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekscrap.com</link>
	<description>there is at least one way to do it</description>
	<lastBuildDate>Tue, 12 Apr 2011 10:14:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Multiple IP uplinks with Gentoo</title>
		<link>http://geekscrap.com/2010/02/multiple-ip-uplinks-with-gentoo/</link>
		<comments>http://geekscrap.com/2010/02/multiple-ip-uplinks-with-gentoo/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 08:00:32 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[How-tos]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[iproute2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multihoming]]></category>
		<category><![CDATA[policy routing]]></category>
		<category><![CDATA[split access]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=739</guid>
		<description><![CDATA[When your computer or server has access to multiple LAN segments with different address spaces and different gateways to the Internet, there&#8217;s a nice feature called policy routing that allows you to use all of them simultaneously without having to re-configure your network topology. This is especially useful when you want to increase the bandwidth and [...]]]></description>
			<content:encoded><![CDATA[<p>When your computer or server has access to multiple LAN segments with different address spaces and different gateways to the Internet, there&#8217;s a nice feature called <em>policy routing</em> that allows you to use all of them simultaneously without having to re-configure your network topology. This is especially useful when you want to increase the bandwidth and resilience of a single computer or server without the burden of being an Autonomous System (BGP peering, Internet Registry bureaucracy, etc.).</p>
<p>Here are the steps to setup multiple uplinks through policy routing on Gentoo:</p>
<p><span id="more-739"></span></p>
<ol>
<li>First of all, to access multiple networks, either you have multiple physical NICs or you need to configure your network uplink to let your network ports access multiple VLANs. For more information on VLANs configurations under Gentoo, you can check Gentoo Handbook <a rel="nofollow" href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&amp;chap=3#doc_chap10">section on VLANs</a>.</li>
<li>On Linux kernel, you need to enable CONFIG_IP_MULTIPLE_TABLES option (in Linux kernel menuconfig, you find it under <em>Networking support =&gt; Networking options =&gt; IP: policy routing</em>). <a rel="nofollow" href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Recompile and install kernel</a>.</li>
<li>Next, you need to install iproute2 package, which allows editing multiple routing tables:
<pre># emerge -av sys-apps/iproute2</pre>
</li>
<li>Edit <em>/etc/iproute2/rt_tables</em> and add the following route table lines:
<pre>100        T0
101        T1</pre>
</li>
<li>Edit your <em>/etc/conf.d/net</em> file to enable network startup configuration. First add the following lines, modifying addresses and interface names to suit your needs:
<pre lang="bash">config_eth0=( "192.168.0.100/24" )
routes_eth0=(
    "192.168.0.0/24 src 192.168.0.100 table T0"
    "default via 192.168.0.1 table T0"
    "default nexthop via 192.168.0.1 weight 1"
)
rules_eth1=("from 192.168.1.1/32 table T0 priority 100" )

config_eth1=( "192.168.1.200/24" )
routes_eth0=(
    "192.168.1.0/24 src 192.168.1.200 table T1"
    "default via 192.168.1.1 table T1"
    "default nexthop via 192.168.0.1 weight 1"
)
rules_eth1=("from 192.168.1.100/32 table T1 priority 101" )</pre>
<p>Then uncomment the following functions (if you copied your /etc/conf.d/net from /etc/conf.d/net.example, they should be already there in comments):</p>
<pre lang="bash">postup() {
       local x="rules_${IFVAR}[@]"
       local -a rules=( "${!x}" )
       if [[ -n ${rules} ]] ; then
               einfo "Adding IP policy routing rules"
               eindent
               # Ensure that the kernel supports policy routing
               if ! ip rule list | grep -q "^" ; then
                       eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
                       eerror "in your kernel to use ip rules"
               else
                       for x in "${rules[@]}" ; do
                               ebegin "${x}"
                               ip rule add ${x} dev "${IFACE}"
                               eend $?
                       done
               fi
               eoutdent
               # Flush the cache
               ip route flush cache dev "${IFACE}"
       fi
}

postdown() {
       # Automatically erase any ip rules created in the example postup above
       if interface_exists "${IFACE}" ; then
               # Remove any rules for this interface
               local rule
               ip rule list | grep " iif ${IFACE}[ ]*" | {
                       while read rule ; do
                               rule="${rule#*:}"
                               ip rule del ${rule}
                       done
               }
               # Flush the route cache
               ip route flush cache dev "${IFACE}"
       fi

       # Return 0 always
       return 0
}</pre>
</li>
<li>Finally, reboot with your new kernel. My advice is to proceed with this step while you can access your machine locally, just in case anything goes wrong.</li>
</ol>
<p>Some in-depth on what I described above: with policy routing you can insert additional routing tables and configure your system to use a set of rules to decide which table to apply for each IP packet. So if you create T0 and T1 tables, you can set your host to respond to requests from each interface back to the same interface and load balance routes going to outer network by giving the same <em>weight</em> to both gateways in generic route table.</p>
<p>If you use this setup to publish your server on multiple public networks, you will probably need to configure multiple DNS A records in round-robin over your IPs.</p>
<p>If you&#8217;re interested in more Gentoo tips, just <a href="http://geekscrap.com/feed/">subscribe</a> to my feed or <a rel="nofollow" href="http://twitter.com/geekscrap">follow me</a> on Twitter.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/multiple-ip-uplinks-with-gentoo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Top 25 vulnerability RSS feeds</title>
		<link>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/</link>
		<comments>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 08:00:11 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[cert]]></category>
		<category><![CDATA[checkpoint]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nist]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[opml]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[securityfocus]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=702</guid>
		<description><![CDATA[One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update on demand, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>One way to receive up-to-date reports about vulnerability issues is subscribing to vulnerability RSS feeds: they update <em>on demand</em>, they don&#8217;t rely on your mail subsystem and they don&#8217;t fill up your mailbox. The only drawback is that you could miss alerts if you don&#8217;t sync your feeds for a long time, but if you&#8217;re a IT security manager, you don&#8217;t have a life, so how could it happen anyways? <img src='http://geekscrap.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Here&#8217;s the top feeds you should be subscribed to (<a rel="nofollow" href="http://cve.mitre.org/">CVE</a> tags are reported in brackets):</p>
<ol>
<li><a rel="nofollow" href="http://nvd.nist.gov/download/nvd-rss.xml">NIST Vulnerability Database</a>.</li>
<li><a href="http://www.us-cert.gov/channels/techalerts.rdf">US Cert Technical Security Alerts</a> [CERT].</li>
<li><a href="http://www.securityfocus.com/rss/vulnerabilities.xml">SecurityFocus Vulnerabilities</a> [SF-INCIDENTS].</li>
<li><a rel="nofollow" href="http://osvdb.org/feed/vulnerabilities/latest.rss">Open Source Vulnerability Database</a> [OSVDB].</li>
<li><a rel="nofollow" href="http://www.iss.net/rss.php">IBM Internet Security Systems Threats</a> [ISS].</li>
<li><a rel="nofollow" href="http://www.vupen.com/security-advisories.xml">Vupen Security Advisories</a> [VUPEN].</li>
<li><a rel="nofollow" href="http://secunia.tumblr.com/rss">Secunia Latest Security Advisories</a> (Unofficial) [SECUNIA].</li>
<li><a rel="nofollow" href="http://research.eeye.com/rss/published.rss">eEye Security Advisories</a> [EEYE].</li>
</ol>
<p>The above list is also available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories.opml">OPML file</a> you can import into your feed reader.</p>
<p><span id="more-702"></span>Furthermore, you should subscribe to Operating Systems product-centric vulnerability feeds to ensure you receive timely information regarding updated packages and suggested workarounds for your infrastructure. Here&#8217;s a comprehensive list, sorted alphabetically:</p>
<ol>
<li><a rel="nofollow" href="http://rss.lists.apple.com/security-announce.rss">Apple Security Announce</a> (Mac OS X, iPhone, etc) [APPLE].</li>
<li>Checkpoint&#8217;s <a href="http://www.checkpoint.com/defense/advisories/public/smartdefense_atomz.xml">SmartDefense Service</a> [CHECKPOINT].</li>
<li><a rel="nofollow" href="http://newsroom.cisco.com/data/syndication/rss2/SecurityAdvisories_20.xml">Cisco&#8217;s Product &amp; Service Security Advisories</a> [CISCO].</li>
<li><a rel="nofollow" href="http://www.debian.org/security/dsa-long">Debian Security Advisories</a> [DEBIAN].</li>
<li><a rel="nofollow" href="https://admin.fedoraproject.org/updates/rss/rss2.0?type=security">Fedora Security Updates</a> [FEDORA].</li>
<li><a rel="nofollow" href="http://www.freebsd.org/security/rss.xml">FreeBSD Security Advisories</a> [FREEBSD].</li>
<li><a rel="nofollow" href="http://www.gentoo.org/rdf/en/glsa-index.rdf">Gentoo Linux Security Advisories</a> (GLSA) [GENTOO].</li>
<li><a rel="nofollow" href="http://www.mandriva.com/rss/feed/security">Mandriva Security Advisories</a> [MANDRIVA].</li>
<li>Microsoft&#8217;s <a rel="nofollow" href="http://www.microsoft.com/technet/security/bulletin/RssFeed.aspx?snscomprehensive">Security Notification Service Comprehensive Edition</a> [MS].</li>
<li><a rel="nofollow" href="http://www.NetBSD.org/support/security/rss-advisories.xml">NetBSD Security Advisories</a> [NETBSD].</li>
<li><a rel="nofollow" href="http://www.openpkg.com/security/advisories/?format=rss">OpenPKG Security Advisories</a> [OPENPKG].</li>
<li><a rel="nofollow" href="http://www.undeadly.org/cgi?action=errata">OpenBSD Errata</a> [OPENBSD].</li>
<li><a rel="nofollow" href="https://rhn.redhat.com/rpc/recent-errata.pxt">Red Hat Security Advisories</a> [REDHAT].</li>
<li><a href="http://dev.slackware.it/rss/slackware-security.xml">Slackware Linux Security Advisories</a> [SLACKWARE].</li>
<li><a rel="nofollow" href="http://search.sun.com/feed/atom/results.jsp?col=main-support-sunalerts&amp;oneof=security&amp;nh=30&amp;rf=1&amp;type=advanced&amp;optstat=true&amp;qt=security&amp;reslang=en&amp;st=1">Solaris SunSolve Alerts</a> [SUNALERT].</li>
<li><a rel="nofollow" href="http://www.novell.com/linux/security/suse_security.xml">SUSE Linux Enterprise Security Advisories</a> (also contains OpenSUSE advisories) [SUSE].</li>
<li><a rel="nofollow" href="http://www.ubuntu.com/usn/rss.xml">Ubuntu Security Notices</a> [UBUNTU].</li>
</ol>
<p>OS security advisory feeds are available as <a href="http://geekscrap.com/wp-content/uploads/2010/02/Security-Advisories1.opml">OPML file</a> as well.</p>
<p>Have I missed anything? Please report if you find some advisory feed I accidentally missed. Also, if you&#8217;re into an Operating System security team and you don&#8217;t offer a security announcement feed, please consider making it available.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/top-25-vulnerability-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LUKS mermaids of remote unlock</title>
		<link>http://geekscrap.com/2010/02/luks-mermaids-of-remote-unlock/</link>
		<comments>http://geekscrap.com/2010/02/luks-mermaids-of-remote-unlock/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:00:02 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[autistici]]></category>
		<category><![CDATA[crackdown]]></category>
		<category><![CDATA[cryptsetup]]></category>
		<category><![CDATA[dm-crypt]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LUKS]]></category>
		<category><![CDATA[paranoia]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=632</guid>
		<description><![CDATA[Recently, I&#8217;ve browsed several how-to&#8217;s regarding the possibility of unlocking a LUKS root volume remotely using an SSH connection. For reference, the first of its kind is the one for Debian, published at Coulmann.de. Some of these how-to&#8217;s were posted to forums and mailing-lists and received many thankful comments from sysadmins wondering how to make [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve browsed several how-to&#8217;s regarding the possibility of unlocking a <a href="http://code.google.com/p/cryptsetup/">LUKS</a> root volume remotely using an SSH connection. For reference, the first of its kind is the one for Debian, published at <a href="http://gpl.coulmann.de/ssh_luks_unlock.html">Coulmann.de</a>. Some of these how-to&#8217;s were posted to forums and mailing-lists and received many <a href="http://ubuntuforums.org/showthread.php?t=829768">thankful comments</a> from sysadmins wondering how to make their encrypted secure setup also easy to administrate.</p>
<p>The problem with their approach is simple: they asked <em>how</em> to fix their setup, but forgot to ask <em>what</em> they&#8217;re trying to protect. Having your root filesystem on an encrypted disk doesn&#8217;t protect you from remote exploitation or credential leaks. It just protects you from the risk of someone being able to access your machine locally and steal your data, or just steal the whole machine altogether. Now, if I were an attacker having access to your hardware locally, I could easily setup a trap for you in less than 5 minutes:</p>
<p><span id="more-632"></span></p>
<ol>
<li>Shut down your machine and open it.</li>
<li>Connect your machine&#8217;s root disk to an external USB interface connected to my laptop.</li>
<li>Copy your initramfs file from boot partition (which is clear-text, remember?), access internal files and extract SSH server keys.</li>
<li>Bring up an interface with a fake ssh server running on my laptop which runs your initrd script, slightly modified to tap passwords.</li>
<li>Just wait for you to notice your machine went down and connect via ssh to bring it back up. Ta-da.</li>
</ol>
<p>Depending on the scenario, some additional step covering may be necessary, but the theory is there: if you can&#8217;t check your hardware personally, disk encryption is useless (and even then, human stupidity is the weak link).</p>
<p>In 2004, Autistici/Inventati hacking group was running a server at Aruba server farm and hosting several mailboxes and websites. During a police inquiry on one of those mailboxes, law officers wanted to obtain TLS encryption keys to tap users messages, so they unplugged the server and copied data from the server volumes. When server admins asked Aruba about the downtime, Aruba told them it was an electrical fault, so it took <strong>one year</strong> to find out about <a href="http://www.autistici.org/ai/crackdown/">the crackdown</a>. If disks had been encrypted with LUKS and set up for remote unlocking, it would have been quite easy for law officers to trick server admins into typing unlock key over the wire, since ISP employees were under their control.</p>
<p>Bottom line: if you&#8217;re paranoid enough to setup encrypted disks, you shouldn&#8217;t really trust remote unlocking anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/luks-mermaids-of-remote-unlock/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using screen as your login shell</title>
		<link>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/</link>
		<comments>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:42:29 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=609</guid>
		<description><![CDATA[GNU screen is a nice utility that allows running multiple interactive shells from the same terminal session and allows you to detach from your terminal while keeping those shells alive. Later on, you can re-attach to your background screen to get back to your shells. It has a lot more features like automatic session logging and [...]]]></description>
			<content:encoded><![CDATA[<p>GNU <a rel="nofollow" href="http://www.gnu.org/software/screen/">screen</a> is a nice utility that allows running multiple interactive shells from the same terminal session and allows you to detach from your terminal while keeping those shells alive. Later on, you can re-attach to your background screen to get back to your shells. It has a lot more features like automatic session logging and terminal window splitting. You can discover them all in the <a href="http://www.gnu.org/software/screen/manual/screen.html">manual</a>.</p>
<p>How many times did you start a long-running task like gcc compilation on a remote server and then suddenly needed to disconnect from your shell? Maybe you just needed to move to some other place with your laptop, but if you disconnected from your LAN, your ssh connection would go down. How many times you thought &#8220;Damn, if I had launched screen before this&#8230;&#8221;?</p>
<p><span id="more-609"></span>The trick to save your compile time and not break your schedule is simple: just have your shell .profile script run screen at startup on your remote server. For bash, the syntax is simple, just add the following line at the end of your ˜/.profile script:</p>
<pre lang="bash">if [ ${SHLVL} -eq 1 ]; then
    ((SHLVL+=1)); export SHLVL
    exec screen -R -e "^Ee" ${SHELL} -l
fi</pre>
<p>Quick implementation notes:</p>
<ol>
<li>Parameter -R reattaches to an existing detached session, if it exists, otherwise creates a new one.</li>
<li>Parameter -e sets a non-standard escape character. This is useful since you don&#8217;t want login screen to interfere with other screens you may spawn during your activity. I chose Ctrl-E as it&#8217;s not used by other well-known keyboard shortcuts and works on most OSes.</li>
</ol>
<p>To detach from your server type <em>Ctrl-E d</em> or just close your terminal window. Running processes will remain active in background, without detaching from your shell. When you connect to your remote shell again, you&#8217;ll get back to your session.</p>
<p>Do you like Unix tips like this? Follow me on <a rel="nofollow" href="http://twitter.com/geekscrap">Twitter</a> or subscribe to my <a href="http://geekscrap.com/feed/">RSS feed</a> for more.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/using-screen-as-your-login-shell/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The Microsoft hotfix tale</title>
		<link>http://geekscrap.com/2010/02/the-microsoft-hotfix-tale/</link>
		<comments>http://geekscrap.com/2010/02/the-microsoft-hotfix-tale/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 08:30:20 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[q819536]]></category>
		<category><![CDATA[roaming profiles]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[windows 2000]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=486</guid>
		<description><![CDATA[A few people on Earth still have a Windows 2000 machine laying around in their lab, mostly schools with severe budget cuts. Some time ago, one of these retro labs had a problem with roaming profiles: apparently Windows 2000 desktop machines refused to sync their profile on logoff. A collegue of mine asked my help [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.w3schools.com/browsers/browsers_os.asp">few people</a> on Earth still have a Windows 2000 machine laying around in their lab, mostly schools with severe budget cuts. Some time ago, one of these retro labs had a problem with <em>roaming profiles</em>: apparently Windows 2000 desktop machines refused to sync their profile on logoff. A collegue of mine asked my help to try and fix the issue, so I started debugging user environment using <a href="http://support.microsoft.com/kb/221833">the classic procedure</a>.</p>
<p>What I found out was that machines were configured to access netlogon share and run a VBScript script upon logon, to set a few things like printing shares and stuff like that. Unluckily, Windows 2000 has a problem with this, because if VBScript instantiates a WMI object and uses it to read registry keys, then WMI object is not released correctly and this locks the registry hive and therefore Windows logoff sync aborts after a long wait.</p>
<p><span id="more-486"></span>The problem is known to Microsoft and a report on the issue is published at KB <a href="http://support.microsoft.com/kb/819536">819536</a>. Now since this lab is located in Italy and and Windows 2000 is localized in italian, Microsoft Knowledge Base site opened in Italian and the page with the bug report mentioned that an hotfix was available but one should call Microsoft support service at no charge to receive it, no link to download the file or anything. So my collegue looked up Microsoft Italia phone number and called up:</p>
<blockquote><p><strong>Sysadmin</strong>: «Hello, I have a problem with a Windows 2000 workstation and I need a hotfix.»<br />
<strong> Microsoft female voice</strong>: «Ok, so I need to open a support case and have someone from the staff call you back.»<br />
<strong> Sysadmin</strong>: «Ok.»<br />
<strong> Microsoft female voice</strong>: «Is your workstation stand-alone or in a domain?»<br />
<strong> Sysadmin</strong>: «Domain.» (it was a samba domain, but better not tell.)<br />
<strong> Microsoft female voice</strong>: «Ok, listen, your machine is NOT in a domain.»<br />
<strong> Sysadmin</strong>: «Uh?»<br />
<strong> Microsoft female voice</strong>: «Look, if I open a enterprise support request for machines in a domain, you have to pay € 299, while if you request a stand-alone support call, it costs you just € 79.»<br />
<strong> Sysadmin</strong>: «Erm&#8230;Your website states that hotfixes are free, aren&#8217;t they?»<br />
<strong> Microsoft female voice</strong>: «Possibly, but just in case you need further help, your fee will be lower.»<br />
<strong> Sysadmin</strong>: «Err&#8230;ok&#8230;nice.» (these Microsoft employees must be really fed up working for the devil himself.)<br />
<strong> Microsoft female voice</strong>: «So, now I need your phone number and your credit card details&#8230;»</p></blockquote>
<p>After one hour we received a call from a guy at their support team. We explained him what we needed and he told us that hotfix was free and we would not pay anything. Then he sent the hotfix over via e-mail. The hotfix worked perfectly and replaced <em>C:\WINDOWS\system32\wbem\stdprov.dll</em> version <em>1.50.1085.104</em> with version <em>1.50.1085.105</em>.</p>
<p>In the hotfix e-mail he also <a href="http://geekscrap.com/wp-content/uploads/2010/02/SRX1118808598ID-Win-2000-pro-_-the-customer-requested_-hotfix-819536.txt">dropped a note</a> saying that Windows 2000 is not supported anymore and therefore hotfixes that are not security-related are not available anymore to customers (he sent the hotfix by mistake). He also said that we would not pay the hotfix he already sent, but that we should consider this information for future requests. In a subsequent phone call from him, he told me that his boss made clear that this is the official position of the company regarding hotfixes for Windows 2000.</p>
<p>Now the crazy thing: when I looked back on Microsoft&#8217;s knowledge base in English (USA), I noticed that on all country versions except Italy, hotfixes for all languages and all Operating Systems are available for download directly at their site at no charge (a download request link is rendered <em>just under the title</em>).</p>
<p>Moral of the story: proprietary software can actually let you down in ways you don&#8217;t imagine, so if you&#8217;re near the end of support cycle, download all the patches and hotfixes you can and make backups.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/the-microsoft-hotfix-tale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux RAID disk wipeout</title>
		<link>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/</link>
		<comments>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 08:30:35 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[md]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=418</guid>
		<description><![CDATA[A common problem with Linux software RAID (aka md) happens when you try to use a disk that was previously part of some other disk array. Symptoms include: wrong volume size, unable to add device to raid, volume UUID mismatch. To fix the problem you need to use mdadm utility on the disk to cleanup: # [...]]]></description>
			<content:encoded><![CDATA[<p>A common problem with Linux software RAID (aka <em>md</em>) happens when you try to use a disk that was previously part of some other disk array. Symptoms include: wrong volume size, unable to add device to raid, volume UUID mismatch. To fix the problem you need to use mdadm utility on the disk to cleanup:</p>
<pre># mdadm --zero-superblock devicepath</pre>
<p>If you need to apply this fix on a system that doesn&#8217;t boot up (for instance when your root volume is on RAID), remember that mdadm and other disk administration utilities are available in <a rel="nofollow" href="http://distfiles.gentoo.org/releases/x86/autobuilds/current-iso/">Gentoo minimal installation disk</a>.</p>
<p><span id="more-418"></span><strong>UPDATE</strong>: Rav asked for the gory details so here it is: when you initially create a Linux RAID array, mkraid writes a signature to the disk called <em>superblock</em>, which contains a unique UUID code for the array and a description of the array (size, raid level, etc). When Linux kernel boots up, this superblock is read by the md kernel module and a minor device number is assigned to the array. Even if you erase your partition table or mbr, this superblock won&#8217;t be erased.<br />
The problem arises when you try to add a disk with an existing superblock to a computer that already has another array in place (for instance when replacing a faulty RAID1 or RAID5 disk): if md driver recognises a superblock, it won&#8217;t allow your added drive to join the array and will report a generic &#8220;Invalid argument&#8221; error. Furthermore, it can happen that, if a minor number is forced onto an array, when booting a system with two parts of arrays trying to grab the same minor, none of them can get through and therefore md devices are not available.<br />
So, instead of zeroing the whole disk with dd if=/dev/zero of=/dev/path, which can take a certain amount of time and is quite useless (if you&#8217;re rebuilding RAID1 or RAID5, your disk contents will be overwritten by raid reconstruction anyway), you can use the command explained at the beginning to erase just the bad superblock and fix the problem.</p>
<p>Just a final notice: another problem with replacing disks in RAID1 and RAID5 happens when people try to use a volume which is slightly smaller than the others in the array (even if advertised capacity is the same of the old drives, there can be slight differences in actual number of blocks). In this case, the error reported from md upon loading is the same as above: &#8220;Invalid argument&#8221;. So if your disk is unused, this is probably the first thing to check, otherwise try the following command on the disk device to check for existing superblocks:</p>
<pre># mdadm -E devicepath</pre>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/linux-raid-disk-wipeout/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Yo momma uses Ubuntu</title>
		<link>http://geekscrap.com/2010/02/yo-momma-uses-ubuntu/</link>
		<comments>http://geekscrap.com/2010/02/yo-momma-uses-ubuntu/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 08:30:24 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[transition]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=357</guid>
		<description><![CDATA[Recently I replaced my mother&#8217;s PC, and I thought I could switch her to Linux. She was previously using Windows XP with several Open Source applications (Open Office, Firefox, Thunderbird, etc), so I decided to install Ubuntu 9.10, since it seems that it&#8217;s most devoted to non-expert users (she&#8217;s over-sixty and not inclined to change [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I replaced my mother&#8217;s PC, and I thought I could switch her to Linux. She was previously using Windows XP with several Open Source applications (Open Office, Firefox, Thunderbird, etc), so I decided to install Ubuntu 9.10, since it seems that it&#8217;s most devoted to non-expert users (she&#8217;s over-sixty and not inclined to change her computing habits).</p>
<p>The installation was straightforward and hardware support was really seamless (whew! ACPI works like a charm on new Dells), however I noticed that once the system is running, the &#8220;<em>works with clueless user</em>&#8221; claim (they call it &#8220;<em>alternative to Windows</em>&#8220;, but that&#8217;s the actual meaning) lasts only five minutes.</p>
<p><span id="more-357"></span><br />
There are two main issues on the table:</p>
<ol>
<li><strong>Documentation</strong>: several aspects of the system have changed but documentation lags behind. For instance, <a rel="nofollow" href="http://upstart.ubuntu.com/">upstart</a> replaced old service management facilities and Services applet was removed from System -&gt; Administration menu, but documentation still refers to it. Furthermore, internal documentation search feature is very primitive compared to Mac OS X or Windows ones and &#8220;search the forums&#8221; option cannot really replace a knowledge base like Microsoft&#8217;s.</li>
<li><strong>Robustness</strong>: Ubuntu should take the release-early-release-often agility rule with a grain of salt: if replacing a subsystem completely takes a certain amount of time, you cannot really split replacement in two phases just to respect release scheduling. A lot of users are complaining about the fact that every upgrade adds more quirks than the ones it solves.</li>
</ol>
<p>Open source applications that build up the Ubuntu&#8217;s image of Windows alternative are getting more and more mature and a lot of work has been done to make Linux look like a desktop operating system and not just a bunch of pieces put together. Now it&#8217;s time for distributions like Ubuntu to step up and fix higher quality standards for the whole development community.</p>
<p>For a start, they could set a common standard for documentation and knowlegde base: to offer a real post-install support, you need to have a common error reporting API, clear error messages (not like Microsoft&#8217;s &#8220;contact your System Administrator&#8221; message) and a central repository for documentation and solutions, with a common writing style (haven&#8217;t you noticed a <em>regression</em> since man pages days?), a decent search engine and translations in supported languages. Since no Linux distribution has enough work force to make it all alone, the only alternative is to find an agreement for an interoperability standard with large software projects (Samba, Open Office, Gnome, Cups, etc).</p>
<p>So now my mom is using Ubuntu: I&#8217;ve enabled remote controlling (ssh and rdesktop) to help her with the transition and I&#8217;ve installed a VirtualBox instance with Windows XP, just in case. I replaced standard theme and wallpaper with something she could find attractive (first impression counts!). If you have any good tips for making Ubuntu experience more comfortable, please share them using the comment box below.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/02/yo-momma-uses-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>What evil lurks in OCFS2</title>
		<link>http://geekscrap.com/2010/01/what-evil-lurks-in-ocfs2/</link>
		<comments>http://geekscrap.com/2010/01/what-evil-lurks-in-ocfs2/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 07:30:40 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[gfs]]></category>
		<category><![CDATA[gfs2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[novell]]></category>
		<category><![CDATA[ocfs2]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[san]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=104</guid>
		<description><![CDATA[In the beginning, Linux was a free general purpose OS and it was not clear how Linux companies would generate profits out of it. In 1999 RedHat company went public and started to develop a real business plan. After a few years, in 2003, one of its main competitors, SuSE Linux, was acquired by Novell. [...]]]></description>
			<content:encoded><![CDATA[<p>In the beginning, Linux was a free general purpose OS and it was not clear how Linux companies would generate profits out of it. In 1999 RedHat company went public and started to develop a real business plan. After a few years, in 2003, one of its main competitors, SuSE Linux, was acquired by Novell. Since then, both companies worked hard to reduce their involvement in desktop solutions and develop a segment known as &#8220;server market&#8221;.</p>
<p>One of the key technologies of enterprise server market is <a rel="nofollow" href="http://en.wikipedia.org/wiki/Storage_area_network">Storage Area Network</a>: an infrastructure that abstracts storage resources. When Linux companies started to compete in server market, Linux had support for accessing SAN storages (Fibrechannel and iSCSI drivers), advanced disk partitioning support (LVM and EVMS), but no free <a rel="nofollow" href="http://en.wikipedia.org/wiki/Clustered_file_system#Shared-disk">shared-storage filesystem</a>. So RedHat acquired Sistina&#8217;s GFS, a shared-storage filesystem, imported some work from OpenGFS developers, released it under Open Source license and evolved it to GFS2.</p>
<p><span id="more-104"></span>In the meanwhile, Novell looked around and found that Oracle had an ongoing open source project named OCFS2. It was a general purpose refactoring of original OCFS filesystem, which Oracle had developed years before to deal with clustering of its database product. So Novell decided to integrate OCFS2 into its Suse Linux Enterprise Server platform and advertise it as their top-notch <em>mature</em> filesystem for clustering in SAN environment.</p>
<p>Unluckily, what Novell marketing dept didn&#8217;t actually know is that OCFS2 has never been production-ready, yet.</p>
<p>In the last two years, I&#8217;ve deployed a number of OCFS2 filesystems with Novell SLES 10 SP2 and experienced the following troubles:</p>
<ol>
<li>In <a rel="nofollow" href="http://oss.oracle.com/bugzilla/show_bug.cgi?id=915">certain situations</a>, filesystem reports &#8220;Not enough disk space&#8221; even if df reports 50-60% usage, due to a bug in inode allocation when disk is very fragmented. This bug was reported over two years ago and is still &#8220;in the wild&#8221;!</li>
<li>If a node crashes, it has no support for intelligent fencing like RedHat&#8217;s, so if your cluster has several nodes, you may need to restore quorum manually.</li>
<li>There are several racing conditions in file locking that lead to corruption in shared bdb databases or similar faults.</li>
<li>Sharing OCFS2 folders with Samba on the nodes <a rel="nofollow" href="http://oss.oracle.com/bugzilla/show_bug.cgi?id=1058">crashes the kernel</a>, due to a bug in distributed locking routines. This bug was posted over one year ago and is still marked as &#8220;NEW&#8221; in Oracle&#8217;s bugzilla.</li>
<li>In the event of a system crash, OCFS2 may not recover automatically and needs a fsck. In this case, fsck takes <em>forever</em>, may report critical errors and finally fail, leaving the filesystem unusable and unrecoverable.</li>
<li>Restoring from backup a SAN filesystem of several Terabytes on OCFS2 takes longer. How longer? More.</li>
</ol>
<p>Any attempt to fix these problems using Novell rpm packages, Oracle-released source packages, Linux stock kernels, Linux experimental branches and patches found on bugzilla failed miserably. Furthermore, it&#8217;s pretty clear that Oracle treats users as if they were beta-testers.</p>
<p>Buyers beware: <strong>OCFS2 sucks</strong>.</p>
<p>Is GFS2 any better? Yes (it&#8217;s really designed as an enterprise product and integrated with RedHat clustering suite), but it&#8217;s still too <em>slow</em> for enterprise applications.</p>
<p>Bottom line: Don&#8217;t believe the marketing vapor, Linux on a SAN in 2010 is still a no-go.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/01/what-evil-lurks-in-ocfs2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Gentooize Part 1: colorize console</title>
		<link>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/</link>
		<comments>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 07:30:40 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[How-tos]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=137</guid>
		<description><![CDATA[One of the best lessons you can learn from Gentoo is you can export most of its juice to other OSes. I&#8217;ve been using Gentoo as main Linux distro since 2001. Currently I have a few setups where drawbacks of migrating to Gentoo would exceed benefits, so I decided to increase affinity by adding some [...]]]></description>
			<content:encoded><![CDATA[<p>One of the best lessons you can learn from Gentoo is you can <em>export</em> most of its juice to other OSes. I&#8217;ve been using Gentoo as main Linux distro since 2001. Currently I have a few setups where drawbacks of migrating to Gentoo would exceed benefits, so I decided to increase affinity by adding some Gentoo look&#8217;n'feel. This week I will post some tips to setup Gentoo console colors on other operating systems.</p>
<p><span id="more-137"></span></p>
<h2>Shell prompt</h2>
<p>First of all, you should check you&#8217;re using <strong>bash</strong> shell:</p>
<pre lang="bash">$ env | grep ^SHELL=
SHELL=/bin/bash</pre>
<p>If not, you should check if bash package is already installed. If it&#8217;s already there, just change your user shell (and possibly root shell) with chsh or consult your OS manual. <strong>Be careful</strong>: if bash is not listed in /etc/shells, you might lock yourself out.</p>
<p>To set Gentoo-like colors on bash prompt, edit ~/.profile (or /etc/profile for system-wide defaults) and add the following:</p>
<pre lang="bash">if [[ ${EUID} == 0 ]] ; then
        PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
        PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi</pre>
<h2>GNU ls</h2>
<p>If you use GNU ls (use &#8211;version to check) and <strong>dircolors</strong> utility is available (from GNU <a rel="nofollow" href="http://www.gnu.org/software/coreutils/">coreutils</a>), you can have colorful outputs by adding the following snippet to your bash profile (see above):</p>
<pre lang="bash">if type -P dircolors &gt;/dev/null ; then
        if [[ -f ~/.dir_colors ]] ; then
                eval $(dircolors -b ~/.dir_colors)
        elif [[ -f /etc/DIR_COLORS ]] ; then
                eval $(dircolors -b /etc/DIR_COLORS)
        fi
fi
alias ls='ls --color=auto'</pre>
<p>To enable colors, you need to save Gentoo <a href="http://geekscrap.com/wp-content/uploads/2010/01/DIR_COLORS">color defs</a> to ~/.dir_colors (or /etc/DIR_COLORS for system-wide defaults).<br />
Alternatively, if you miss dircolors binary on your system, save output from dircolors on a Gentoo machine and copy&#8217;n'paste it into bash profile:</p>
<pre lang="bash">LS_COLORS='...weird colon-separated string...'
export LS_COLORS
alias ls='ls --color=auto'</pre>
<h2>BSD ls implementation</h2>
<p>A special trick is required for <strong>FreeBSD</strong> and <strong>Mac OS X</strong>: add the following line to your bash profile:</p>
<pre lang="bash">export CLICOLOR=1 LSCOLORS="ExGxFxDxCxDxDxhbhdacEc"</pre>
<p>If you want to further customize colors on your <strong>Mac OS X Terminal</strong>, you can use SIMBL <a rel="nofollow" href="http://ciaranwal.sh/2007/11/01/customising-colours-in-leopard-terminal">TerminalColours</a> plugin (<a rel="nofollow" href="http://blog.fallingsnow.net/2009/08/28/fixing-colors-in-terminal-app-on-10-6/">Snow Leopard version</a>).</p>
<h2>GNU grep</h2>
<p>You can enable coloring of the matched part by appending the following alias to your bash profile:</p>
<pre lang="bash">alias grep='grep --colour=auto'</pre>
<p>As usual, if you have any coloring tips&#8217;n'tricks you want to share, please use the comment box below.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/01/gentooize-part-1-colorize-console/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows back-to-the-future bug</title>
		<link>http://geekscrap.com/2010/01/windows-back-to-the-future-bug/</link>
		<comments>http://geekscrap.com/2010/01/windows-back-to-the-future-bug/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 00:52:40 +0000</pubDate>
		<dc:creator>geekscrap</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://geekscrap.com/?p=238</guid>
		<description><![CDATA[According to this advisory written by Tavis Ormandy, Windows has been exposed to a vulnerability for over 15 years! Microsoft will only release a patch for supported products, so if you have any Windows 2000 or earlier in your lab, the only way to fix is disabling DOS and WOWEXEC.]]></description>
			<content:encoded><![CDATA[<p>According to <a rel="nofollow" href="http://support.microsoft.com/default.aspx/kb/220159">this advisory</a> written by Tavis Ormandy, Windows has been exposed to a vulnerability for <strong>over 15 years</strong>! Microsoft will only release a patch for supported products, so if you have any Windows 2000 or earlier in your lab, the only way to fix is <a rel="nofollow" href="http://support.microsoft.com/default.aspx/kb/220159">disabling DOS and WOWEXEC</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekscrap.com/2010/01/windows-back-to-the-future-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
