<?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>Random Tech Articles &#187; linux</title>
	<atom:link href="http://www.analogrithems.com/rant/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.analogrithems.com/rant</link>
	<description>If I have seen a little further it is by standing on the shoulders of Giants. - Newton</description>
	<lastBuildDate>Tue, 10 Aug 2010 20:51:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Debugging Unix</title>
		<link>http://www.analogrithems.com/rant/2009/06/14/debugging-unix/</link>
		<comments>http://www.analogrithems.com/rant/2009/06/14/debugging-unix/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 23:15:44 +0000</pubDate>
		<dc:creator>analogrithems</dc:creator>
				<category><![CDATA[Irix]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=56</guid>
		<description><![CDATA[When ever I come across a command or service in Unix that crashes or fails to run properly I quickly go to the trace tools to trace the system commands.  I often find that If I just follow the system trace i can usually see what was supposed to happen and didn&#8217;t.  Unfortunatley not every [...]]]></description>
			<content:encoded><![CDATA[<p>When ever I come across a command or service in Unix that crashes or fails to run properly I quickly go to the trace tools to trace the system commands.  I often find that If I just follow the system trace i can usually see what was supposed to happen and didn&#8217;t.  Unfortunatley not every unix flavor uses the same tracing commands.</p>
<p>In linux it is very simple prefix any command with <strong>strace</strong> and it will give you lots of system trace info.</p>
<p>In Solaris use the <strong>truss</strong> command.</p>
<p>In Irix use the <strong>par</strong> command.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.analogrithems.com/rant/2009/06/14/debugging-unix/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.analogrithems.com/rant/2009/06/14/debugging-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why nscd sucks&#8230;.</title>
		<link>http://www.analogrithems.com/rant/2008/09/16/why-nscd-sucks/</link>
		<comments>http://www.analogrithems.com/rant/2008/09/16/why-nscd-sucks/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 01:27:53 +0000</pubDate>
		<dc:creator>analogrithems</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nscd]]></category>

		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=5</guid>
		<description><![CDATA[The name service cache daemon has some serious flaws. One that I notice pretty often in Linux arises when you are using LDAP. It seems that nscd will crash and burn when/if ldap is unavailable. Unfortunately when nscd bombs, it usually takes the entire system with it. Actually what will happen is nscd sockets will [...]]]></description>
			<content:encoded><![CDATA[<p>The name service cache daemon has some serious flaws.  One that I notice pretty often in Linux arises when you are using LDAP.  It seems that nscd will crash and burn when/if ldap is unavailable.  Unfortunately when nscd bombs, it usually takes the entire system with it.  Actually what will happen is nscd sockets will start getting broken pipe&#8217;s and becoming stale until you have several nscd.  Eventually your system will slow to a halt.  Mind you the box hasn&#8217;t crashed, but the box is in a dos state.  If you do an &#8216;<em>$# netstat -an</em>&#8216; you&#8217;ll notice several entries in reference to &#8216;/var/run/nscd/socket&#8217;.  This bug has been listed by several distros, I&#8217;ve yet to see any of them address it properly.</p>
<p>From what I&#8217;ve discovered about nscd this issue is a design flaw in nscd.  Several people have just recommended disabling nscd.  While this is a solution, it isn&#8217;t an acceptable solution in an enterprise environment. Especially if you are using oracle.  Several oracle tools and apps will freeze or crash if they can&#8217;t talk to the nscd socket.  Lame I know, but I&#8217;ve observed this in at least Oracle 10i.</p>
<p><strong>Solutions</strong></p>
<p>Now there are tow ways to get around this.  One is to make your LDAP service load balanced and highly available.  You can do replication in OpenLDAP with slurpd and then use something like balance to make the service highly available.  Another option though is to fix nscd so it doesn&#8217;t bomb your machine when it dies.</p>
<p>In this article we are going to go over the fix nscd solution.  nscd comes with a config file located in &#8216;<em>/etc/nscd.conf&#8217;</em> This file tells the nscd daemon how long to cache which name service.  See the man page to understand what each option means. The quick way to fix nscd is to tell the service here not to cache passwd and group info.  This will make nscd not go to LDAP and freak out if LDAP is not available.  Randomly I also came across a drop in replacement for nscd that dosen&#8217;t suffer from this issue. <a href="http://www.analogrithems.com/rant/wp-content/uploads/2008/09/nscd-033.c">unscd-033.c</a> The compile instructions are in the file. I can&#8217;t guarantee this safe, but I&#8217;ve used it for a while in an enterprise environment and seem haven&#8217;t had any nscd issues since<a href="http://www.analogrithems.com/rant/wp-content/uploads/2008/09/nscd-033.c"><br />
</a></p>
<p><strong>Refferences:</strong></p>
<ul>
<li>http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=248271</li>
</ul>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.analogrithems.com/rant/2008/09/16/why-nscd-sucks/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.analogrithems.com/rant/2008/09/16/why-nscd-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ldap with linux a basic primmer</title>
		<link>http://www.analogrithems.com/rant/2008/09/16/ldap-with-linux-a-basic-primmer/</link>
		<comments>http://www.analogrithems.com/rant/2008/09/16/ldap-with-linux-a-basic-primmer/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 22:59:37 +0000</pubDate>
		<dc:creator>analogrithems</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[centralized authentication]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pam]]></category>

		<guid isPermaLink="false">http://www.analogrithems.com/rant/?p=3</guid>
		<description><![CDATA[LDAP has been around for over a decade, and yet it is still considered a newer technology.  Many modern vendors have added LDAP authentication.  This document is a brief generic howto for configuring linux to use LDAP.  This will be a fairly detailed recipe as most of my docs are. Linux Name Services Name Server [...]]]></description>
			<content:encoded><![CDATA[<p>LDAP has been around for over a decade, and yet it is still considered a newer technology.  Many modern vendors have added LDAP authentication.  This document is a brief generic howto for configuring linux to use LDAP.  This will be a fairly detailed recipe as most of my docs are.</p>
<p><strong>Linux Name Services</strong><br />
Name Server Switch is the engine that really enables Linux to harness LDAP. In linux you have two different ldap.conf files that the modules and services use to configure their ldap communications &#8216;/etc/ldap.conf&#8217; and &#8216;/etc/openldap/ldap.com&#8217;. The first gives the dn&#8217;s for passwd, group and sudoers. You can also specify the server and communication protocol. One really cool bonus is that you get to enable the host_acl based of users with this config file</p>
<p>host    ldap.analogrithems.com<br />
base    dc=analogrithems,dc=com,dc=us<br />
ldap_version    3<br />
#Validate cert<br />
tls_checkpeer no<br />
ssl     start_tls<br />
#ssl on<br />
nss_map_attribute       uniqueMember member<br />
pam_password_prohibit_message Please visit http://enterprise.company.com/password_policy.html.<br />
pam_groupdn cn=ldap.analogrithems.com,ou=Computers,dc=analogrithems,dc=com,dc=us<br />
pam_member_attribute uniquemember<br />
pam_filter accountStatus=active<br />
nss_base_passwd         ou=People,dc=analogrithems,dc=com,dc=us?one<br />
nss_base_shadow         ou=People,dc=analogrithems,dc=com,dc=us?one<br />
nss_base_group          ou=Groups,dc=analogrithems,dc=com,dc=us?one<br />
sudoers_base    ou=SUDOers,dc=analogrithems,dc=com,dc=us<br />
#This options is VERY helpful for debugging sudo ldap extension<br />
#sudoers_debug 2</p>
<p><strong>PAM</strong><br />
PAM is an authentication and accounting module that allows Linux services to use different methods for authenticating users (MySQL, LDAP, NIS, etc..). Their are two different pam config versions. You should look up the version your gnu/linux vedor uses for exact details on ldap setup, for SuSE you modify &#8220;/etc/security/pam_unix2.conf&#8221; to include the following. This system makes it so you don&#8217;t have to modify every pam service to use ldap, you just let them all use the standard unix2 module which then handles the ldap lookup.</p>
<p>auth:   use_ldap<br />
account:        use_ldap<br />
password:       use_ldap<br />
session:        none</p>
<p><strong>NSS</strong><br />
Edit your &#8216;/etc/nsswitch.conf&#8217; place the word ldap before files for the passwd and group name service. You can also add it to sudoers if you want to store your sudo configs in ldap also</p>
<p>passwd: compat<br />
shadow: compat<br />
group: compat<br />
sudoers: files ldap</p>
<p>passwd_compat: files ldap<br />
shadow_compat: files ldap<br />
group_compat: files ldap</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.analogrithems.com/rant/2008/09/16/ldap-with-linux-a-basic-primmer/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.analogrithems.com/rant/2008/09/16/ldap-with-linux-a-basic-primmer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
