<?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>Things n&#039; Stuff</title>
	<atom:link href="http://geek.co.il/wp/feed" rel="self" type="application/rss+xml" />
	<link>http://geek.co.il/wp</link>
	<description>Thoughts about the universe in general</description>
	<lastBuildDate>Wed, 02 May 2012 16:26:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19978</generator>
		<item>
		<title>הסרט הכי מטופש הגיע לארץ</title>
		<link>http://geek.co.il/wp/2012/05/02/%d7%94%d7%a1%d7%a8%d7%98-%d7%94%d7%9b%d7%99-%d7%9e%d7%98%d7%95%d7%a4%d7%a9-%d7%94%d7%92%d7%99%d7%a2-%d7%9c%d7%90%d7%a8%d7%a5</link>
		<comments>http://geek.co.il/wp/2012/05/02/%d7%94%d7%a1%d7%a8%d7%98-%d7%94%d7%9b%d7%99-%d7%9e%d7%98%d7%95%d7%a4%d7%a9-%d7%94%d7%92%d7%99%d7%a2-%d7%9c%d7%90%d7%a8%d7%a5#comments</comments>
		<pubDate>Wed, 02 May 2012 08:30:54 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Local]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/05/02/%d7%94%d7%a1%d7%a8%d7%98-%d7%94%d7%9b%d7%99-%d7%9e%d7%98%d7%95%d7%a4%d7%a9-%d7%94%d7%92%d7%99%d7%a2-%d7%9c%d7%90%d7%a8%d7%a5</guid>
		<description><![CDATA[ולפי המסורת היישראלית ארוכת השנים של שמות מטופשים לסרטים מטופשים, אז איך נתרגם את השם של הסרט Battleship המבוסס על המשחק ה&#8221;מרתק&#8221; ורב העלילה ”צוללות” (באנגלית Battleship) ? ניחשתם נכון:]]></description>
			<content:encoded><![CDATA[<p>ולפי המסורת היישראלית ארוכת השנים של שמות מטופשים לסרטים מטופשים, אז איך נתרגם את השם של הסרט Battleship המבוסס על המשחק ה&#8221;מרתק&#8221; ורב העלילה ”צוללות” (באנגלית Battleship) ?</p>
<p><span id="more-1970"></span></p>
<p>ניחשתם נכון:</p>
<p><img title="" class="alignnone" alt="image" src="http://geek.co.il/wp/wp-content/uploads/2012/05/wpid-באטלשיפ.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/05/02/%d7%94%d7%a1%d7%a8%d7%98-%d7%94%d7%9b%d7%99-%d7%9e%d7%98%d7%95%d7%a4%d7%a9-%d7%94%d7%92%d7%99%d7%a2-%d7%9c%d7%90%d7%a8%d7%a5/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>April 1st in Technology</title>
		<link>http://geek.co.il/wp/2012/04/01/april-1st-in-technology</link>
		<comments>http://geek.co.il/wp/2012/04/01/april-1st-in-technology#comments</comments>
		<pubDate>Sun, 01 Apr 2012 06:57:33 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/04/01/april-1st-in-technology</guid>
		<description><![CDATA[More interesting things will probably come up during the day, but so far I liked Google&#8217;s idea (also see a link from google.com).]]></description>
			<content:encoded><![CDATA[<p>More interesting things will probably come up during the day, but so far I liked <a href="http://www.nascar.com/video/none/none/120331/cup-mar-google/">Google&#8217;s idea</a> (also see a link from google.com).</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/04/01/april-1st-in-technology/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>שרכים על הקיר</title>
		<link>http://geek.co.il/wp/2012/02/23/%d7%a9%d7%a8%d7%9b%d7%99%d7%9d-%d7%a2%d7%9c-%d7%94%d7%a7%d7%99%d7%a8</link>
		<comments>http://geek.co.il/wp/2012/02/23/%d7%a9%d7%a8%d7%9b%d7%99%d7%9d-%d7%a2%d7%9c-%d7%94%d7%a7%d7%99%d7%a8#comments</comments>
		<pubDate>Thu, 23 Feb 2012 21:07:21 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[night]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/02/23/%d7%a9%d7%a8%d7%9b%d7%99%d7%9d-%d7%a2%d7%9c-%d7%94%d7%a7%d7%99%d7%a8</guid>
		<description><![CDATA[צילום בלילה עם פלאש: More stuff can be found at this picasa web album: Wallpapers]]></description>
			<content:encoded><![CDATA[<p>צילום בלילה עם פלאש:</p>
<p><a alt="image" href="http://geek.co.il/wp/wp-content/uploads/2012/02/wpid-20120223_2257261.jpg"><img title="20120223_225726.jpg" class="alignnone" alt="image" src="http://geek.co.il/wp/wp-content/uploads/2012/02/wpid-20120223_225726.jpg" /></a></p>
<p><span id="more-1962"></span></p>
<p><a alt="image" href="http://geek.co.il/wp/wp-content/uploads/2012/02/wpid-20120223_2256061.jpg"><img title="20120223_225606.jpg" class="alignnone" alt="image" src="http://geek.co.il/wp/wp-content/uploads/2012/02/wpid-20120223_225606.jpg" /></a></p>
<p>More stuff can be found at this picasa web album:</p>
<table style="width:194px;">
<tr>
<td align="center" style="height:194px;background:url(https://picasaweb.google.com/s/c/transparent_album_background.gif) no-repeat left"><a href="https://picasaweb.google.com/106683721332215152390/Wallpapers?authuser=0&#038;feat=embedwebsite"><img src="https://lh6.googleusercontent.com/-SqHeLzobvtQ/T1SUyAiGFDE/AAAAAAAAARI/HnSOaH2spdg/s160-c/Wallpapers.jpg" width="160" height="160" style="margin:1px 0 0 4px;"/></a></td>
</tr>
<tr>
<td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="https://picasaweb.google.com/106683721332215152390/Wallpapers?authuser=0&#038;feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Wallpapers</a></td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/02/23/%d7%a9%d7%a8%d7%9b%d7%99%d7%9d-%d7%a2%d7%9c-%d7%94%d7%a7%d7%99%d7%a8/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Definetly the weirdest LDAP management tool</title>
		<link>http://geek.co.il/wp/2012/02/21/definetly-the-weirdest-ldap-management-tool</link>
		<comments>http://geek.co.il/wp/2012/02/21/definetly-the-weirdest-ldap-management-tool#comments</comments>
		<pubDate>Tue, 21 Feb 2012 13:30:51 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Funny]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/02/21/definetly-the-weirdest-ldap-management-tool</guid>
		<description><![CDATA[Its called ldapvi, and its just about what you&#8217;d expect with that name . The author would like you to think about it as vipw for your LDAP based authentication, and in addition to a few command line option it really isn&#8217;t much more then that (UI-wise): How I got to it? For some reason, [...]]]></description>
			<content:encoded><![CDATA[<p>Its called <a href="http://www.lichteblau.com/ldapvi/">ldapvi</a>, and its just about what you&#8217;d expect with that name <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . The author would like you to think about it as <code><a class="zem_slink" title="Vipw" href="http://en.wikipedia.org/wiki/Vipw" rel="wikipedia">vipw</a></code> for your <a class="zem_slink" title="Lightweight Directory Access Protocol" href="http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol" rel="wikipedia">LDAP</a> based authentication, and in addition to a few command line option it really isn&#8217;t much more then that (UI-wise):</p>
<p><span id="more-1947"></span></p>
<p><a href="http://geek.co.il/wp/wp-content/uploads/2012/02/ldapvi.png"><img class="alignnone size-full wp-image-1949" title="ldapvi" src="http://geek.co.il/wp/wp-content/uploads/2012/02/ldapvi.png" alt="" width="484" height="630" /></a></p>
<p>How I got to it? For some reason, when running Fedora&#8217;s KDE software management tool, this was the only suggested software in response to the search &#8220;LDAP&#8221; (which wasn&#8217;t a library, plugin or command line tool).</p>
<p>I gave it a chance and actually, its really useful syntax.</p>
<p>Entries are separated by one or more empty lines, and each start with an entry ID number followed by the fully qualified DN of the entry. To edit an entry, just change the following lines in any way you see fit &#8211; updating, adding or removing properties is as easy as writing in VI. If you want to add a new entry, create a new batch of lines but start with a line that has the word <code>add</code> (instead of an entry id) followed by the DN you want to add.</p>
<p>A note to remember: the passwords are shown and editable (at least if you log in as a user with full administrative permissions) &#8211; as the hash result, exactly as its stored in the directory server itself. You can manipulate them just like any other LDAP attribute, but to set up a new password you&#8217;d have to first generate the hash for the new password, and save that. One option is to use the OpenLDAP <code>slappasswd</code>, for example:</p>
<p><code>slappasswd -h {SHA} -s somepassword<br />
</code></p>
<p>The <code>-h</code> parameter specifies the hashing algorithm to use, and you have to put that text in the attribute value before the hash result. <a href="http://www.openldap.org/faq/data/cache/347.html">This OpenLDAP FAQ entry has more on the subject of password hashes</a>, including some useful scripts.</p>
<p>When you &#8220;save&#8221; the buffer, ldapvi will prompt you for a confirmation, which may looks like this:</p>
<p><code><br />
add: 3, rename: 0, modify: 0, delete: 0<br />
Action? [yYqQvVebB*rsf+?] ?<br />
</code></p>
<p>At which point you are supposed to hit &#8220;y&#8221; to update the server, though as you can see there are quite a few alternative choices (and in the spirit of VI, presented in a very concise way). And basically that&#8217;s it.</p>
<p>So if you&#8217;re looking for a good tool to manage your LDAP directory, and your&#8217;re a die-hard fan of VI, this just may be the thing for you. Me? Its a useful tool and I&#8217;ll be happy to keep it on my belt to fall on to if I&#8217;m fresh out of options (which is actually currently the case), but I&#8217;ll keep looking for something more&#8230; how shall I put it&#8230; graphical? less looking like an 80s reject? no, I know &#8211; something I can happily let MSCEs use <img src='http://geek.co.il/wp/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://geek.co.il/wp/2012/02/16/ldap-authentication-on-fedora-16-and-why-it-sucks">LDAP authentication on Fedora 16 (and why it sucks)</a> (geek.co.il)</li>
<li class="zemanta-article-ul-li"><a href="http://acordocoletivo.org/2011/12/31/ldap-lightweight-directory-access-protocol/">LDAP &#8211; Lightweight Directory Access Protocol</a> (acordocoletivo.org)</li>
<li class="zemanta-article-ul-li"><a href="http://administratosphere.wordpress.com/2012/02/09/using-browsers-with-openldap-cnconfig-tree/">Using Browsers with OpenLDAP cn=config Tree</a> (administratosphere.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=88771b57-0647-48f1-b804-3dbdd1528395" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/02/21/definetly-the-weirdest-ldap-management-tool/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nvidia Optimus on Ubuntu 12.04</title>
		<link>http://geek.co.il/wp/2012/02/19/nvidia-optimus-on-ubuntu-12-04</link>
		<comments>http://geek.co.il/wp/2012/02/19/nvidia-optimus-on-ubuntu-12-04#comments</comments>
		<pubDate>Sun, 19 Feb 2012 00:04:27 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Graphics processing unit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/02/19/nvidia-optimus-on-ubuntu-12-04</guid>
		<description><![CDATA[Nvidia Optimus is a neat solution to the problem of power consumption vs. 3D performance in notebook computers &#8211; the computer comes with two graphics chips, an &#8220;integrated graphics package&#8221; &#8211; the Intel GMA embedded graphics and a &#8220;discrete graphics package&#8221; &#8211; the Nvidia chip. The setup works by running your normal windowing UI on [...]]]></description>
			<content:encoded><![CDATA[<p>Nvidia Optimus is a neat solution to the problem of power consumption vs. 3D performance in notebook computers &#8211; the computer comes with two graphics chips, an &#8220;integrated graphics package&#8221; &#8211; the Intel GMA embedded graphics and a &#8220;discrete graphics package&#8221; &#8211; the Nvidia chip. The setup works by running your normal windowing UI on the integrated graphics, only powering on the discrete graphics when you want to play a 3D game or something like that.</p>
<p>Recently I had the fortune to work on a Lenovo T420 laptop that has this setup, and it works very well on MS-Windows with the Nvidia Optimus driver &#8211; you get battry life around 10 hours with the 9 cell battery.</p>
<p>Unfortunately I spend most of my day in Linux and because Nvidia does not support Optimus on Linux, you have the poor choice of either running everything on the Nvidia chip &#8211; decreasing battery life to around 4 hours if you&#8217;re careful, or disabling the Nvidia chip completely.</p>
<p>The solution comes from the <a href="http://bumblebee-project.org/">Bumblebee project</a> &#8211; a software suite to handle the switching between the Nvidia discrete graphics and the embedded Intel chip.</p>
<p>The setup is pretty simple to understand (though I suspect under the hood there are many problems to be solved): A service runs and waits for users to ask for 3D accelerated graphics. When a user starts a program using the special command <code>optirun</code>, the service loads the Nvidia driver, starts an X server using the discrete graphics (with the display disconnected from the actual screen) and runs the specified program on that &#8220;background&#8221; X server. Then it copies the visuals from the program that is rendered using the discrete graphics to a window on the main X server. When the program terminates, the service closes the secondary X server, removes the driver and powers down the graphics card &#8211; putting us back into the ~10 hours battery life.</p>
<p>The Bumblebee software had some problems in the past, but the current version &#8211; 3.0 &#8211; looks very good. There are a few seconds of delay when you launch the application (setting up the driver and X takes some time), but performance is about what you&#8217;d expect when running directly on the hardware. All this without any configuration &#8211; that is if you are running on the stable Ubuntu version.</p>
<p>As I can&#8217;t leave well enough alone, and whenever someone says &#8220;alpha&#8221;, I say &#8211; &#8220;I wants&#8221;, I&#8217;m running the current Ubuntu 12.04 alpha (which is not so bad &#8211; due to be released in a couple of months, it works very well). And of course Bumblebee doesn&#8217;t work properly here.</p>
<p>So this is what I had to do to get it running:</p>
<p><span id="more-1935"></span><br />
These instructions assume you are doing everything in a command line. If you are not comfortable with the command line, this guide is not for you &#8211; go away.</p>
<ol>
<li>We will start by installing Bumblbee itself and its dependencies. We will need to add their PPA to the <a class="zem_slink" title="The Ubuntu Experience (Nelson Mandela Interview)" href="http://www.youtube.com/watch?v=ODQ4WiDsEBQ" rel="youtube">Ubuntu software</a> sources list: <code><br />
sudo add-apt-repository ppa:bumblebee/stable<br />
</code> Unfortunately the project has a repository for Ubuntu 12.04, but at this point in time it does not include all the needed packages. I had to edit the source list file and add the 11.10 repositories as well before installation could complete &#8211; open the file <code>/etc/apt/sources.list.d/bumblebee-stable-precise.list</code> for editing as root, for example: <code><br />
sudo gedit /etc/apt/sources.list.d/bumblebee-stable-precise.list<br />
</code> and duplicate the two lines found there, changing the word <code>precise</code> to <code>oneiric</code> in the duplicates. Save and exit the editor, then run these:<code><br />
sudo apt-get update<br />
sudo apt-get install bbswitch-dkms bumblebee bumblebee-nvidia virtualgl-libs:i386 libgl1-mesa-glx:i386 libc6:i386<br />
sudo usermod -a -G bumblebee $USER<br />
</code><br />
The last line adds the current user (the one you are logged in as) to the &#8220;bumblbee&#8221; user group &#8211; only users who are part of this group may use the Bumblebee service. If you have more users that you want to be able to play 3D games, then you need to add them as well.</li>
<li><a href="http://bumblebee-project.org/install.html#Ubuntu">The Bumblebee Project recommends</a> Ubuntu users to install the &#8220;X-Swat&#8221; x-updates PPA, but this isn&#8217;t available for 12.04 users, and we are already running the latest X anyway, right? After bumblebee didn&#8217;t work for me, I went to the next best thing &#8211; the xorg-edgers repository. A word of warning &#8211; this is a set of highly experimental software &#8211; if it works for you, count yourself lucky and if it doesn&#8217;t &#8211; don&#8217;t complain. To install it, type:<code><br />
sudo apt-add-repository ppa:xorg-edgers/ppa<br />
sudo apt-get update<br />
sudo apt-get dist-upgrade -y<br />
</code> At this point most likely your kernel and other important software packages have been upgraded, so its a good idea to reboot.</li>
<li>After you come back from the reboot, the standard Nvidia driver will not work, because of an incompatible ABI version. Not to worry, its time to recompile a new Nvidia driver. Start by removing your old one with:<code><br />
sudo apt-get purge nvidia-current<br />
</code>Now to get the most up to date Nvidia driver package to rebuild a driver that works with your latest Xorg and kernel, create a new directory to hold the Nvidia package sources and change into it, and type: <code><br />
sudo apt-get install build-essential checkinstall -y<br />
sudo apt-get build-dep nvidia-current-updates -y<br />
apt-get source nvidia-current-updates<br />
</code> Now with the source downloaded and all dependencies installed, we can build a new driver and install it:<code><br />
cd nvidia-graphics-drivers*<br />
dpkg-buildpackage -us -uc -nc<br />
cd ..<br />
sudo dpkg -i nvidia-current-updates_*.deb<br />
</code>If all went well, you have your new Nvidia driver instaled. Lets see if it loads Ok:<code><br />
sudo modprobe nvidia_current_updates<br />
</code>If you get no error, then we can go to the next step.</li>
<li>The Bumblebee configuration must be modified to work with all this cutting edge stuff, so lets start by turning off the Bumblbee service:<code><br />
sudo stop bumblebeed<br />
</code><br />
Now you need to edit the Bumblebee configuration file. Use your favorite text editor to open <code>/etc/bumblebee/bumblebee.conf</code> as root, for example:<code><br />
sudo gedit /etc/bumblebee/bumblebee.conf<br />
</code>. This is a standard <a class="zem_slink" title="INI file" href="http://en.wikipedia.org/wiki/INI_file" rel="wikipedia">INI file</a>with a lot of comments to help you figure out what is going on in here, and we will need to do some changes to (a) disable auto-detection and force Nvidia mode and (b) help Bumblebee locate the drivers for the Nvidia graphics. Make these changes:</p>
<ul>
<li>In the <code>[bumblebeed]</code> section, set <code>Driver=nvidia</code></li>
<li>In the <code>[driver-nvidia]</code> section, set <code>KernelDriver=nvidia_current_updates</code> and in both <code>LibraryPath</code> and <code>XorgModulePath</code> change <code>nvidia-current</code> to <code>nvidia-current-updates</code>.</li>
</ul>
<p>Save the file after all the changes have been complete, and start the service again:<code><br />
sudo start bumblbeed<br />
</code></li>
<li>At this point, Bumblebee should be ready to do some damage. The recommended way to test it is to run <code><br />
optirun glxspheres<br />
</code>Give it a few seconds to launch the window (the screen may black out for a bit, don&#8217;t worry about it). When the window appears, it should show a graphical demo and a frame per seconds counter at the bottom left corner. On my system it shows a respectable 86 frames per seconds (vs 2 frames per seconds on the embedded Intel chip). If the glxspehere window doesn&#8217;t come up, and you get errors from the optirun command, look in the system log file <code>/var/log/syslog</code> for lines from <code>bumblebeed</code>. Also if you haven&#8217;t rebooted your computer since you built the Nvidia drivers, it might be a good idea to try that as well.</li>
</ol>
<p>Running games with optirun is pretty straight forward &#8211; either invoke them manually or edit their .desktop files to add the optirun command. I&#8217;ve also used this in MS-Windows games running under wine (I recommend using <a href="http://www.playonlinux.com/">PlayOnLinux</a> &#8211; its a beautiful piece of work), and they work perfectly well.</p>
<p>Best of luck, and let me know if it works or if it doesn&#8217;t.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://geek.co.il/wp/2011/11/15/installing-nvidia-drivers-on-fedora-16-the-wrong-way">Installing Nvidia drivers on Fedora 16 &#8211; the wrong way</a> (geek.co.il)</li>
<li class="zemanta-article-ul-li"><a href="http://techie-buzz.com/foss/ubuntu-12-04-lts-precise-pangolin-alpha.html">Ubuntu 12.04 LTS, Codename Precise Pangolin Releases Its First Alpha</a> (techie-buzz.com)</li>
<li class="zemanta-article-ul-li"><a href="http://neelmohile.wordpress.com/2011/11/02/how-to-manually-install-latest-nvidia-drivers-on-ubuntu-oneiric-11-10/">How to manually install latest nvidia drivers on Ubuntu Oneiric 11.10</a> (neelmohile.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=d4402761-b953-4034-aaa8-420ae8bd248d" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/02/19/nvidia-optimus-on-ubuntu-12-04/feed</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>LDAP authentication on Fedora 16 (and why it sucks)</title>
		<link>http://geek.co.il/wp/2012/02/16/ldap-authentication-on-fedora-16-and-why-it-sucks</link>
		<comments>http://geek.co.il/wp/2012/02/16/ldap-authentication-on-fedora-16-and-why-it-sucks#comments</comments>
		<pubDate>Thu, 16 Feb 2012 11:52:20 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PAM]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/02/16/ldap-authentication-on-fedora-16-and-why-it-sucks</guid>
		<description><![CDATA[In my company we (still) use an Active Directory domain controller to manage central authentication, which is not set up very well &#8211; no SSL and the Kreberos setup is not done properly. This makes gives much trouble to modern Linuxes (e.g. not Ubuntu. yes &#8211; I&#8217;m looking at you Shuttleworth.)  such as Fedora, as [...]]]></description>
			<content:encoded><![CDATA[<p>In my company we (still) use an Active Directory domain controller to manage central authentication, which is not set up very well &#8211; no SSL and the Kreberos setup is not done properly. This makes gives much trouble to modern Linuxes (e.g. <a title="Ubuntu network authentication, pending since 2005" href="https://blueprints.launchpad.net/ubuntu/+spec/network-authentication">not Ubuntu. yes &#8211; I&#8217;m looking at you Shuttleworth</a>.)  such as Fedora, as Fedora have done away with NSS/PAM based LDAP authentication and instead relies on SSS &#8211; which I have yet managed to get working or even find a tutorial on how to set it up properly.</p>
<p>So if you still want to authentication your Fedora installation against the company&#8217;s Active Directory &#8211; and can&#8217;t/won&#8217;t rely on Winbind&#8217;s notably flaky behaviour, you can always install NSS/PAM ldap authentication manually. Unfortunately its not as easy as it sounds, and as I learned the hard way &#8211; one must pay careful attention to SELinux. So here&#8217;s the recipe:</p>
<p><span id="more-1936"></span></p>
<ol>
<li>Install pam_ldap and nss_ldap: <code>yum install -y nss_ldap</code> (this will also install the PAM support).</li>
<li>Configure LDAP access. In Fedora the NSS and PAM configuration were broken into 2 different files. Fortunately the syntax and required configuration is identical so you can just create both files as a copy of each other or even use a link. My configuration looks like this:
<p><code><br />
# the Active Directory domain - this the LDAPized FQDN of your Active Directory tree<br />
base dc=some,dc=domain,dc=com<br />
# the CN of an unpriviliged user that is allowed to log in and search in the domain.<br />
# we created this dummy user that is not part of the normal domain user and it is needed<br />
# for many integration scenarios<br />
binddn CN=authuser,CN=Users,dc=some,dc=domain,dc=com<br />
bindpw 123456<br />
scope sub<br />
timelimit 120<br />
bind_timelimit 120<br />
bind_polict soft<br />
idle_timelimit 3600<br />
# this is the default set up for SBS directory installation<br />
nss_base_passwd		ou=SBSUsers,ou=Users,ou=MyBusiness,dc=some,dc=domain,dc=com<br />
nss_base_shadow		ou=SBSUsers,ou=Users,ou=MyBusiness,dc=some,dc=domain,dc=com<br />
nss_base_group		ou=Security Groups,ou=MyBusiness,dc=some,dc=domain,dc=com?sub<br />
nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd,gdm<br />
# this configuration is based on SFU 3.5 schema that must be installed on the ActiveDirectory server<br />
nss_map_objectclass posixAccount user<br />
nss_map_objectclass shadowAccount user<br />
nss_map_attribute uid sAMAccountName<br />
nss_map_attribute homeDirectory unixHomeDirectory<br />
nss_map_attribute shadowLastChange pwdLastSet<br />
nss_map_objectclass posixGroup group<br />
nss_map_attribute uniqueMember member<br />
pam_login_attribute sAMAccountName<br />
pam_filter objectclass=User<br />
pam_password md5<br />
# configuration for the LDAP server connection<br />
ssl no<br />
uri ldap://LDAP.SERVER.NAME/<br />
tls_cacertdir /etc/openldap/cacerts<br />
</code></p>
<p>The <code>pam_ldap</code> and <code>nss_ldap</code> come with a default configuration file &#8211; just overwrite both of these with the content above (after adapting it to your needs &#8211; change the LDAP server name, the LDAP base DN, login user and search paths).</p>
<p>This is as good a time as any to make sure that your computer can indeed access the LDAP server. I recommend installing <code>openldap-clients</code> and running a test query using <code>ldapsearch</code>. For example, the following query will list all the users eligible for log in using the configuration above:</p>
<p><code><br />
ldapsearch -h LDAP.SERVER.NAME -D "CN=authuser,CN=Users,dc=some,dc=domain,dc=com" -w 123456 -b "ou=SBSUsers,ou=Users,ou=MyBusiness,dc=some,dc=domain,dc=com" dn<br />
</code>
</li>
<li>Now you need to configure the authentication stack to use your new LDAP configuration. Unfortunately, the Fedora configuration tool will not allow you to select LDAP without SSL or TLS and without Krebros, so we&#8217;d need to edit the configuration files by hand. But lets start with a clean setup &#8211; run <code>authconfig-tui --enablemkhomedir</code> and make sure only &#8220;Cache Information&#8221;, &#8220;Use Shadow Passwords&#8221; and &#8220;Local authorization is sufficient&#8221; are selected, and click &#8220;Next&#8221;.
<p>Now lets go edit the configuration files directory. There are two configuration files that need to be edited &#8211; <code>/etc/pam.d/system-auth</code> and <code>/etc/pam.d/password-auth</code>. The changes needed to both are identical so just go ahead and edit one of them with your favorite text editor and then copy it over the other one:</p>
<ul>
<li>In the <code>auth</code> section, before the line for <code>pam_deny</code> add:
<p><code><br />
auth        sufficient    pam_ldap.so use_first_pass<br />
</code>
</li>
<li>In the <code>account</code> section, before the line for <code>pam_permit</code> add:
<p><code><br />
account     [default=bad success=ok user_unknown=ignore] pam_ldap.so<br />
</code>
</li>
<li>In the <code>password</code> section, before the line for <code>pam_deny</code> add:
<p><code><br />
password    sufficient    pam_ldap.so use_authtok<br />
</code>
</li>
<li>In the <code>session</code> section, after the last line, add:
<p><code><br />
session     optional      pam_ldap.so<br />
</code>
</li>
</ul>
<p>Alternatively, you can download <a href="http://geek.co.il/wp/wp-content/uploads/2012/02/fix-auth.txt">this patch file</a>, and execute it using <code>cd /etc/pam.d; patch < fix-auth.txt</code>.</p>
<p>Additionally you need to configure NSS separately by adding the </code><code>ldap</code> module to the configuration in <code>/etc/nsswitch.conf</code>: edit the file and add it in the lines for <code>passwd</code>, <code>shadow</code> and <code>groups</code>, like so:</p>
<p><code><br />
passwd:     files ldap<br />
shadow:     files ldap<br />
group:      files ldap<br />
</code>
</li>
<li>We also need to get SELinux to allow NSS and PAM to contact the LDAP server as part of the login process (before the user gets their own security context where such things are allowed). To do that, run this command: <code>setsebool authlogin_nsswitch_use_ldap 1</code></li>
</ol>
<p>Your system should now be ready to log in using LDAP. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/02/16/ldap-authentication-on-fedora-16-and-why-it-sucks/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scanning Hand Written Texts Into High Quality Digital Files</title>
		<link>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files</link>
		<comments>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files#comments</comments>
		<pubDate>Tue, 03 Jan 2012 23:37:21 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files</guid>
		<description><![CDATA[The purpose of this exercise is to convert a hand written note &#8211; such as your signature &#8211; to high quality digital files that can be used to embed &#8220;hand write&#8221; into documents &#8211; such as when someone asks you to fax them a &#8220;signed&#8221; copy of the PDF they emailed you. You&#8217;d be surprised [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this exercise is to convert a hand written note &#8211; such as your signature &#8211; to high quality digital files that can be used to embed &#8220;hand write&#8221; into documents &#8211; such as when someone asks you to fax them a &#8220;signed&#8221; copy of the PDF they emailed you. You&#8217;d be surprised how often that happens around here.</p>
<p>Required Ingridients:</p>
<ul>
<li>A computer with The GIMP installed</li>
<li>Your handy smart phone with a 5MP or better camera</li>
<li>A good pen and paper.</li>
</ul>
<p>So anyway, here&#8217;s the process from top to bottom, with pictures:</p>
<ol>
<li>Sit down at a proper table, and using a good black heavy-line pen on a white clean high-density paper, write what you need to write &#8211; slowly and deliberately but without pauses. Try not to smear the ink so you get clean continuous lines, otherwise the quality suffers a lot.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/write-out.jpg"><img class="alignnone  wp-image-1896" title="write-out" src="http://geek.co.il/wp/wp-content/uploads/2012/01/write-out.jpg" alt="" width="576" height="432" /><span id="more-1895"></span></a></li>
<li>Now take your phone and start the camera app. Make sure that flash is on (not auto &#8211; always on), and if your camera supports it, set the &#8220;auto focus&#8221; mode to &#8220;Macro&#8221;. Position the camera close to the paper so that it sees your whole text and hold the shutter button (don&#8217;t release it yet) to let the camera focus. If you don&#8217;t get a clean focus then don&#8217;t take the shot, move the camera a bit away and try again until you get a clean focus.</li>
<li>After the picture is taken, load it into the computer. This part is usually the most complicated part of the whole process. On my phone I have &#8220;Google Docs&#8221; app installed, so I &#8220;Share&#8221; to &#8220;Docs&#8221; and I then use the browser to go to Google Docs and download the image file.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/2012-01-03-22.21.01.jpg"><img class="alignnone  wp-image-1898" title="Hello World" src="http://geek.co.il/wp/wp-content/uploads/2012/01/2012-01-03-22.21.01.jpg" alt="" width="640" height="480" /></a></li>
<li>Now its time to start GIMP, load the picture and do the magic:<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_001.png"><img class="alignnone  wp-image-1899" title="Selection_001" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_001-300x207.png" alt="" width="441" height="303" /></a></li>
<li>The first tool to use is the &#8220;Crop&#8221; tool from the toolbox &#8211; we need the image contain only the actual hand written note we want to convert, and specifically we need to get rid of the edges of the picture where the flash didn&#8217;t highlight the paper well (because the camera was so close to the paper<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_0011.png"><img class="alignnone  wp-image-1902" title="Crop tool" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_0011.png" alt="" width="754" height="574" /></a><br />
The &#8220;Auto Shrink&#8221; feature is normally very useful for these kinds of jobs, but because of the inherently &#8220;noisy&#8217; background of the paper, it wouldn&#8217;t work at all &#8211; just do your best manually and leave a bit of margin around the text. When you&#8217;re done setting up the box around the text, then click the center of the selection to make the crop.</li>
<li>Next we need to clear the image of most of the background noise of the paper before the real work can begin &#8211; to do this we will use the popular &#8220;Unsharp Mask&#8221; filter<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_019.png"><img class="alignnone size-full wp-image-1912" title="Select &quot;Filters&quot; &quot;Enhance&quot; &quot;Unsharp Mask&quot;" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_019.png" alt="" width="790" height="466" /></a><br />
When the &#8220;Unsharp Mask&#8221; dialog comes up, push both the &#8220;Radius&#8221; and &#8220;Amount&#8221; sliders all the way to the end, while leaving the &#8220;Threshold&#8221; value at its default small value (I usually set it to 5, but any small number will work fine)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_019.png"><img class="alignnone size-full wp-image-1913" title="Unsharp Mask at work" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_019.png" alt="" width="665" height="491" /></a><br />
After you apply the filter, the image would look drastically different, as you can see in the example below, but we&#8217;re not done yet<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_020.png"><img class="alignnone size-full wp-image-1914" title="Image much cleared up, but there are still a lot of artifacts" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Selection_020.png" alt="" width="666" height="440" /></a><br />
If you look closely you&#8217;ll see that there are still some color artifacts present. In this example the photograph source is of rather high quality, but with less high quality input you may still see here some blobs and spots which should get taken care of by the next step.</li>
<li>To completely separate the hand written text from the background, we will use the &#8220;Threshold&#8221; command from the &#8220;Colors&#8221; menu &#8211; this will highlight in black only the ink from the photograph and will clear everything else to white. When the &#8220;Threshold&#8221; dialog opens, click the &#8220;Auto&#8221; button to automatically select the correct threshold value.<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_0191.png"><img class="alignnone size-full wp-image-1915" title="Threshold dialog" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_0191.png" alt="" width="781" height="406" /></a><br />
At this point we are basically done with the major part of the work. We need only prepare the image for embedding and possibly due a bit more clean up if the original wasn&#8217;t of a good enough quality and we still got some black blotches where there shouldn&#8217;t be any.</li>
<li>The next step is to remove the white background from the image so it can be later embed the image into another document without having a white box around the text, that hides whatever we were supposedly &#8220;writing over&#8221;. From the &#8220;Colors&#8221; menu select the &#8220;Color to Alpha&#8221; command and apply its default setting (which should be to have the color White converted to transparency)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_004.png"><img class="alignnone size-full wp-image-1905" title="Desktop 5_004" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_004.png" alt="" width="591" height="362" /></a></li>
<li>If we still got some inky looking blotches, left from the previous stage that we want to remove, you can clean them up manually by adding a layer mask<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_015.png"><img class="alignnone size-full wp-image-1916" title="Add a layer mask" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_015.png" alt="" width="654" height="535" /></a><br />
And set it up to start completely white (opaque &#8211; which is the default)<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_016.png"><img class="alignnone size-full wp-image-1917" title="Layer mask dialog" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_016.png" alt="" width="347" height="473" /></a><br />
Once that is done &#8211; and you can see the layer mask as a white box to the right of the layer preview in the layers tab, take a paintbrush from the toolbox, and touch it to where you have noise that you want removed, careful not to touch actual lines<br />
<a href="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_017.png"><img class="alignnone size-full wp-image-1918" title="Paintbrush tool" src="http://geek.co.il/wp/wp-content/uploads/2012/01/Desktop-5_017.png" alt="" width="525" height="401" /></a><br />
Finally apply the layer mask by right clicking the layer in the layers tab and selecting &#8220;Apply Mask&#8221;</li>
<li>The last step is to save the result as a PNG file &#8211; so that we keep the transparency of the background.</li>
</ol>
<p>The new image is now ready for import into your PDF editing software of choise, or into any other document where you need to fake ink on paper. You can also, obviously, keep the digital file and use it many times without bothering your hardware (pen, paper and camera) again.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2012/01/04/scanning-hand-written-texts-into-high-quality-digital-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>מתכון: מרק חורף צהוב עם אפונה</title>
		<link>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94</link>
		<comments>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94#comments</comments>
		<pubDate>Sat, 03 Dec 2011 21:15:51 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[Soups and Stews]]></category>
		<category><![CDATA[מתכונים]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94</guid>
		<description><![CDATA[הנה מתכון למרק חם וצהוב לחורף, אם אתם בקטע של מרקים צהוביים (מזרחיים, מישהו היה אומר? אולי &#8211; לא יודע). הבסיס הוא אפונה יבשה צהובה (split pea) אז אפשר לקרוא למרק הזה מרק אפונה צהובה, אבל אני מעדיף &#8220;מרק צהוב עם אפונה&#8221; (בין השאר בגלל שאפשר להכין אותו בלי אפונה). מרכיבים: 400 גרם אפונה יבשה [...]]]></description>
			<content:encoded><![CDATA[<p>הנה מתכון למרק חם וצהוב לחורף, אם אתם בקטע של מרקים צהוביים (מזרחיים, מישהו היה אומר? אולי &#8211; לא יודע). הבסיס הוא אפונה יבשה צהובה (split pea) אז אפשר לקרוא למרק הזה מרק אפונה צהובה, אבל אני מעדיף &#8220;מרק צהוב עם אפונה&#8221; (בין השאר בגלל שאפשר להכין אותו בלי אפונה).</p>
<h4>מרכיבים:</h4>
<ul>
<li>400 גרם אפונה יבשה צהובה. אפשר להחליף בעדשים חומות או עדשים כתומות (אם כי הן קטנות יותר ונוטות להפוך לעיסה במרק). לא הייתי ממליץ לשים אפונה יבשה ירוקה או עדשים ירוקות כי המרק לא יקבל את הצבע הצהוב הרצוי שלו.</li>
<li>בצל גדול</li>
<li>תפוח אדמה בינוני או גדול. ניסיתי להחליף לקולורבי &#8211; תחליך התפ&#8221;א הסטנדרטי שלי וזה עובד, אבל לא מדהים.</li>
<li>שני גזרים בינוניים שטופים. אני בד&#8221;כ לא מקלף אותם למרות שאני יודע שיש כאלה שאוהבים את זה, ואני אומר &#8211; כל הויטמינים בקליפה!</li>
<li>2-3 פטריות &#8211; להסמיך את המרק. אפשר גם להחליף בקישוא אבל זה נותן למרק צבע יותר ירוק.</li>
</ul>
<h4>הכנה:</h4>
<p>להעמיד קלחת קטנה עם מים רותחים על חום בינוני-גבוה ולשפוך פנימה את האפונה היבשה או העדשים. לתת לזה לרחוש ולהוסיף מדי פעם מים אם המים לא מכסים את האפונה. נניח לאפונה להתבשל ולהתרכך בזמן שאנחנו מכינים את שאר הרכיבים.</p>
<p>לשים בסיר כף שמן ולקצוץ פנימה את הבצל. בגדול את הבצל אמורים לגרור כמו שנעשה את שאר הירקות, אבל בצל ופומפיה יסתיים בדמעות, אז אני פשוט קוצץ אותו לחתיכות קטנות. לשים על חום בינוני ולתת לבצל להתאדות עד שהוא שקוף. כשהבצל מוכן ומתחיל קצת להשחים, נשתמש בפומפיה בשביל לגרור לתוך הסיר את התפ&#8221;א (כדאי לקלף קודם, אבל אני מניח שלא חייבים) ואת הגזרים. אם החלטנו להשתמש בקישוא במקום בפטריה (או בנוסף &#8211; אני גמיש) אז גם הוא נכנס עכשיו. לכסות את הסיר ולתת לתערובת להתבשל לבד כ-20 דקות. כדאי לפתוח ולערבב מדי פעם.</p>
<p>כשהירקות מוכנים, להוריד את האפונה ולשטוף אותה במים נקיים &#8211; כדי לנקות את כל העמילנים ושאר השטויות שיוצאות בזמן הבישול ועושות קצף &#8211; אני שופך בזהירות את כל המים מהקלחת בלי לאבד את האפונה, ואז ממלא במים נקיים ושופך שוב פעם או פעמיים. לבסוף להוסיף את האפונה &#8211; בלי מים &#8211; לסיר. אם אנחנו רוצים לשים פטריות בפנים (מומלץ &#8211; זה גם מוסיף מאוד לטעם), אז עכשיו זה הזמן להוסיף אותן לסיר, שוב ע&#8221;י לגרור אותן בפומפיה.</p>
<p>למלא את הסיר במים רותחים, ולהביא לרתיחה. לערבב מדי פעם עד שהמרק רותח ואז להוריד לאש קטנה. לבשל כ-20 דקות, וכדאי לערבב מדי פעם.</p>
<p>אחרי 20 דקות, הגיע הזמן להוסיף תבלינים: אני שם כפית כורכום, שתי כפיות כמון, חצי כפית מלח, פלפל פפריקה מתוקה וג&#8217;ינגר כל אחד. לחילופין אבקת קארי המבוססת על כמון כורכום וכוסברה תחליף את רוב התבלינים האלה.</p>
<p>לבשל עוד 10 דקות על אש קטנה ולקרוא למרק &#8220;מוכן&#8221;.</p>
<p>בתיאבון.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://lukeford.net/blog/?p=38511">Longer, Hotter And More Water!</a> (lukeford.net)</li>
<li class="zemanta-article-ul-li"><a href="http://thespectacledbean.wordpress.com/2011/11/25/yesterdays-turkey-is-todays-soup/">Yesterday&#8217;s Turkey Is Today&#8217;s Soup</a> (thespectacledbean.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://balanceandblueberries.wordpress.com/2011/11/18/pea-soup-is-good-for-the-soul/">Pea Soup is good for the soul</a> (balanceandblueberries.wordpress.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=f9275130-cbbd-4ad7-869d-b5de1c4ce0a2" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/12/03/%d7%9e%d7%aa%d7%9b%d7%95%d7%9f-%d7%9e%d7%a8%d7%a7-%d7%97%d7%95%d7%a8%d7%a3-%d7%a6%d7%94%d7%95%d7%91-%d7%a2%d7%9d-%d7%90%d7%a4%d7%95%d7%a0%d7%94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Subversion svnserve daemon on CentOS</title>
		<link>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos</link>
		<comments>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos#comments</comments>
		<pubDate>Mon, 28 Nov 2011 15:04:04 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svnserve]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos</guid>
		<description><![CDATA[When you want to host a Subversion repository on your CentOS (or RHEL) server, its quite annoying that the only options available to serve your repository are SSH (using the svn+ssh:// schema in the Subversion URLs &#8211; it is basically set up out of the box, not tweaking necessary) and Apache&#8217;s mod_dav_svn (using the http:// [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to host a <a class="zem_slink" title="Apache Subversion" href="http://subversion.apache.org/" rel="homepage">Subversion</a> repository on your <a class="zem_slink" title="CentOS" href="http://www.centos.org/" rel="homepage">CentOS</a> (or <a class="zem_slink" title="Red Hat Enterprise Linux" href="http://www.redhat.com/rhel/" rel="homepage">RHEL</a>) server, its quite annoying that the only options available to serve your repository are <a class="zem_slink" title="Secure Shell" href="http://en.wikipedia.org/wiki/Secure_Shell" rel="wikipedia">SSH</a> (using the <code>svn+ssh://</code> schema in the Subversion URLs &#8211; it is basically set up out of the box, not tweaking necessary) and Apache&#8217;s mod_dav_svn (using the <code>http://</code> or <code>https://</code> schema in the Subversion URLs &#8211; this is somewhat complex to setup but good instructions are easy to find on the web).</p>
<p>The main advantage of either of these methods is security: both have easy transport security (SSH by default, Apache if you set it to server over SSL) and are easy to setup authentication for (SSH authenticate against the system&#8217;s accounts using <a class="zem_slink" title="Pluggable Authentication Modules" href="http://en.wikipedia.org/wiki/Pluggable_Authentication_Modules" rel="wikipedia">PAM</a> and Apache authenticate against basically anything with a simple setup).</p>
<p>The main disadvantage of these methods are that they are slow (SSH is apparently somewhat faster then HTTP) and when supporting multiple large projects of many developers I started running into all kinds of weird connection errors when you try to manipulate many files on many projects at the same time.</p>
<p>Subversion itself offers another alternative using their own network service called svnserve &#8211; this is a standard unix daemon that listens on a specific port and uses a native protocol to communicate with Subversion clients (using the <code>svn://</code> schema in Subversion URLs). It offers very good performance, but no transport security (encryption) by default. Another major problem with using svnserve as a network service is that while CentOS ships the binary itself (it is required as part of the way that the svn+ssh:// protocol is implemented) it doesn&#8217;t ship any support files to run it as a standalone service nor to help with its configuration. Also by default svnserve can only authenticate users using its own Apache-style password database file &#8211; which makes it unsuitable to integrate in large organizations.</p>
<p><span id="more-1878"></span></p>
<p>In this article I&#8217;ll document how I setup snvserve as a network service to support a large development environment. The requirements do not include transport security because the server is on a private network and can only be accessed by trusted computers (either local or through a VPN), but we do need to have Subversion users authenticate against a central authentication server that is used by all local services. In my setup the authentication services is Mirosoft ActiveDirectory, but the local server is setup to authenticate to the ActiveDirectory using PAM, so we will setup svnserve to use PAM and gloss over the ActiveDirectory specifics.</p>
<p>The process is as follows:</p>
<ol>
<li>Set up your server: Install CentOS 6 and configure PAM to authenticate to your central authentication. Verify that users can SSH into the server using their login credentials.</li>
<li>Set up your Subversion repository: Install subversion and use svnadmin to create your repository. In the below examples I&#8217;ve created the repository under /var/svn</li>
<li>Set up svnserve to require authentication and do the authentication using the Cyrus SASL libraries: copy the file <code>svnserve.conf</code> from your repository&#8217;s configuration directory (for example <code>/var/svn/svnserve.conf</code>) to <code>/etc/svnserve.conf</code>. Edit it and add in the <code>[general]</code> section the following lines: <code><br />
anon-access = none<br />
auth-access = write<br />
realm = The Name of Your Repository<br />
</code> make sure that all other settings in that section are commented out. Now add, at the bottom of the file, a new section like this: <code><br />
[sasl]<br />
use-sasl = true<br />
</code></li>
<li>Setup the Cyrus SASL library to work with the <code>saslauthd</code> authentication service: create the file <code>/etc/sasl2/svn.conf</code> with the following content: <code><br />
pwcheck_method: saslauthd<br />
mech_list: plain login<br />
</code></li>
<li>Start the <code>saslauthd</code> service and make sure it always run when the system start, by executing the following commands:<code><br />
# service saslauthd start<br />
# chkconfig saslauthd on<br />
</code></li>
<li>Set up <code>saslauthd</code> to allow svnserve to authenticate using the main system&#8217;s PAM configuration, by executing the following command:<code><br />
# cd /etc/pam.d<br />
# ln -s system-auth svn<br />
</code></li>
<li>Create the <a class="zem_slink" title="UNIX System V" href="http://en.wikipedia.org/wiki/UNIX_System_V" rel="wikipedia">SysV</a> initialization script for svnserve &#8211; this will allow you to start and stop svnserve using the <code>service</code> command and have it run when the system start. This is the major part that I expected CentOS to ship but is missing. Creating a good SysV script is not trivial &#8211; you can do it yourself but I suggest using the script presented here. I&#8217;ve used the script from <a href="http://mohanjith.net/blog/2007/07/svnserve-init-script.html">this blog post</a> which is not bad but its implementation of <code>status</code> didn&#8217;t report the status of a dead process, so I modified it and you can download my modified version <a title="svnserve SysV init script" href="http://geek.co.il/wp/wp-content/uploads/2011/11/svnserve.gz">here</a>. The file is compressed because of WordPress, just download it, run it through gunzip and copy the resulting file to <code>/etc/init.d/svnserve</code> and then give it &#8220;execute permissions&#8221; using: <code><br />
# chmod 755 /etc/init.d/svnserve<br />
</code></li>
<li>Create a configuration file for the service by creating and editing the file <code>/etc/sysconfig/subversion.conf</code> with this content: <code><br />
OPTIONS="--config-file=/etc/svnserve.conf -r /var/svn"<br />
</code><br />
We use the <code>-r</code> option to limit svnserve access to only our repository, so have the value there point to your actual repository if its not <code>/var/svn</code></li>
<li>Set up svnserve to run when the system start, and then start the service itself: <code><br />
# chkconfig svnserve on<br />
# service svnserve start<br />
</code></li>
</ol>
<p>And that&#8217;s it &#8211; you should have svnserve listening on port 3690 and ready to serve clients. The URL you use to access the repository should include only the server name as svnserve access is already rooted to only your repository by the configuration file. So for example if my server is called <code>svn</code> then the URL will be <code>svn://svn</code>.</p>
<p>This setup will still allow you to access the repository using the <code>svn+ssh://</code> protocol as you would under a normal setup. It can be a bit confusing as access over SSH uses different paths then over the Subversion svnserve network service, because you have to use the full path to the repository on the local file system in the <code>svn+ssh://</code> URL. To circumvent this, its possible to get the SSH access to also be rooted to your repository&#8217;s path and thus be symmetric with the above setup. To do this, create a new file at <code>/usr/local/bin/svnserve</code> and put the following code in it: <code><br />
#!/bin/bash<br />
exec /usr/bin/svnserve "$@" -r /var/svn<br />
</code><br />
Give the file &#8220;execute permissions&#8221; by running <code><br />
# chmod 755 /usr/local/bin/svnserve<br />
</code>, so it can be executed by the Subversion client instead of the system&#8217;s svnserve binary. Now both native Subversion and SSH access use basically the same URL, except for the schema part.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://waterbiscuit.wordpress.com/2011/08/04/centossubversion-configuration/">CentOS &#8211; Subversion Configuration</a> (waterbiscuit.wordpress.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7505832/passwords-and-svn">Passwords and svn</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/7520886/importing-a-subversion-repository">Importing a subversion repository</a> (stackoverflow.com)</li>
<li class="zemanta-article-ul-li"><a href="http://stackoverflow.com/questions/375869/subversion-merging-repositories">Subversion &#8211; Merging Repositories</a> (stackoverflow.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/zemified_e.png?x-id=83f84754-5ff9-460b-a839-a9c61c13faa2" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>כן, אני מצטט את XKCD &#8211; תתבעו אותי</title>
		<link>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99</link>
		<comments>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99#comments</comments>
		<pubDate>Fri, 25 Nov 2011 00:56:15 +0000</pubDate>
		<dc:creator>Oded</dc:creator>
				<category><![CDATA[Stuff]]></category>

		<guid isPermaLink="true">http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99</guid>
		<description><![CDATA[הקומיקס הזה של XKCD מתאר בדיוק את הרגשת חוסר האונים שיש לי לפחות פעמיים כל שבוע: [מוצג כאן ללא אישור המחבר - אני מקווה שלא אכפת לו]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xkcd.com/979/">הקומיקס הזה של XKCD</a> מתאר בדיוק את הרגשת חוסר האונים שיש לי לפחות פעמיים כל שבוע:<br />
<a href="http://xkcd.com/979/"><img src="http://geek.co.il/wp/wp-content/uploads/2011/11/wisdom_of_the_ancients.png" alt="All long help threads should have a sticky globally-editable post at the top saying &#039;DEAR PEOPLE FROM THE FUTURE: Here&#039;s what we&#039;ve figured out so far ...&#039;" title="wisdom_of_the_ancients" width="485" height="270" class="size-full wp-image-1872" /></a></p>
<p>[מוצג כאן ללא אישור המחבר - אני מקווה שלא אכפת לו]</p>
]]></content:encoded>
			<wfw:commentRss>http://geek.co.il/wp/2011/11/25/%d7%9b%d7%9f-%d7%90%d7%a0%d7%99-%d7%9e%d7%a6%d7%98%d7%98-%d7%90%d7%aa-xkcd-%d7%aa%d7%aa%d7%91%d7%a2%d7%95-%d7%90%d7%95%d7%aa%d7%99/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

