<?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>Chris Moates' adventures in the land of Mox &#187; OpenLDAP</title>
	<atom:link href="http://www.mox.net/tag/openldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mox.net</link>
	<description>The ramblings of Captain Overkill</description>
	<lastBuildDate>Wed, 29 Feb 2012 19:05:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OpenLDAP isn&#8217;t really all that hard</title>
		<link>http://www.mox.net/2009/02/20/openldap-isnt-really-all-that-hard/</link>
		<comments>http://www.mox.net/2009/02/20/openldap-isnt-really-all-that-hard/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 05:02:28 +0000</pubDate>
		<dc:creator>cmoates</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[OpenLDAP]]></category>

		<guid isPermaLink="false">http://www.mox.net/?p=39</guid>
		<description><![CDATA[My friend Steve is looking to setup LDAP at work, and I&#8217;ve done it twice now, so I figured I&#8217;d throw out a simple bit on how I got it working. This is for use with SSH, Apache, and as an address book. For the purposes of this discussion, I&#8217;ll be using Fedora/CentOS package names. [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Steve is looking to setup LDAP at work, and I&#8217;ve done it twice now, so I figured I&#8217;d throw out a simple bit on how I got it working. This is for use with SSH, Apache, and as an address book. For the purposes of this discussion, I&#8217;ll be using Fedora/CentOS package names.</p>
<p>First, you have to establish a name for your store. In my case, this is dc=mox,dc=net, for my domain mox.net.</p>
<p>Packages you will need to install: openldap-servers, openldap-clients</p>
<p>Once you have those, you&#8217;ll need to add a special schema file that makes SSH play nice. It goes in /etc/openldap/schema/ldapns.schema, and looks like this:</p>
<pre class="chili"><code class=""">attributetype ( 1.3.6.1.4.1.5322.17.2.1 NAME &#039;authorizedService&#039;
DESC &#039;IANA GSS-API authorized service name&#039;
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

objectclass ( 1.3.6.1.4.1.5322.17.1.1 NAME &#039;authorizedServiceObject&#039;
DESC &#039;Auxiliary object class for adding authorizedService attribute&#039;
SUP top
AUXILIARY
MAY authorizedService )

objectclass ( 1.3.6.1.4.1.5322.17.1.2 NAME &#039;hostObject&#039;
DESC &#039;Auxiliary object class for adding host attribute&#039;
SUP top
AUXILIARY
MAY host )</code></pre>
<p>Now, at the top of your /etc/openldap/slapd.conf file, there are some includes. You&#8217;ll need to add to that list so that it includes our new schema listed above. My includes section looks like this:</p>
<pre class="chili"><code class=""">include        /etc/openldap/schema/core.schema
include        /etc/openldap/schema/cosine.schema
include        /etc/openldap/schema/inetorgperson.schema
include        /etc/openldap/schema/nis.schema
include        /etc/openldap/schema/ldapns.schema</code></pre>
<p>The entirety of non-commented, non-blank lines from my /etc/openldap/slapd.conf:</p>
<pre class="chili"><code class=""">include        /etc/openldap/schema/core.schema
include        /etc/openldap/schema/cosine.schema
include        /etc/openldap/schema/inetorgperson.schema
include        /etc/openldap/schema/nis.schema
include        /etc/openldap/schema/ldapns.schema
idletimeout 30
allow bind_v2
sasl-regexp     &quot;uid=(.+),cn=login,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
sasl-regexp     &quot;uid=(.+),cn=plain,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
sasl-regexp     &quot;uid=(.+),cn=cram-md5,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
sasl-regexp     &quot;uid=(.+),cn=digest-md5,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
sasl-regexp     &quot;uid=(.+),cn=gssapi,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
sasl-regexp     &quot;uid=(.+),cn=ntlm,cn=auth&quot;
&quot;ldap:///ou=People,dc=mox,dc=net??sub?(uid=$1)&quot;
pidfile        /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args
access to attrs=loginShell,shadowLastChange,userPassword
by dn=&quot;cn=Manager,dc=mox,dc=net&quot; write
by self write
by * read
access to * by * read
database    bdb
suffix        &quot;dc=mox,dc=net&quot;
rootdn        &quot;cn=Manager,dc=mox,dc=net&quot;
rootpw        ldapadminpassword
directory    /var/lib/ldap
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub</code></pre>
<p>You will need to edit to suit, of course. Leave that user named Manager alone though. That&#8217;s your &#8220;admin account&#8221; for LDAP, and it&#8217;ll poke you in the eye if you look at it wrong.</p>
<p>So now you should be able to start up ldap, and have it run without issue. Next up is to create some basic schema. I do this in a couple of phases. First, we have to define the &#8220;root&#8221; of our tree. I put this in a file named root.ldif:</p>
<pre class="chili"><code class=""">dn: dc=mox,dc=net
objectClass: dcObject
objectClass: organization
o: mox.net
dc: mox
description: mox.net root record</code></pre>
<p>Then, I define the &#8220;base nodes&#8221; that go inside the root, namely Groups and People (in SSH-land, this is /etc/passwd and /etc/group, more or less):</p>
<pre class="chili"><code class=""">dn: ou=People,dc=mox,dc=net
ou: People
objectClass: top
objectClass: organizationalUnit

dn: ou=Group,dc=mox,dc=net
ou: Group
objectClass: top
objectClass: organizationalUnit</code></pre>
<p>With those defined, we need to add them to the ldap server. I do this with the following commands:</p>
<pre class="chili"><code class=""">ldapadd -x -W -D cn=Manager,dc=mox,dc=net &lt; root.ldif
ldapadd -x -W -D cn=Manager,dc=mox,dc=net &lt; base.ldif</code></pre>
<p>With those added, we now have a functional LDAP tree. There&#8217;s no users or groups in it, but it is ready for that to happen. Here&#8217;s an example user&#8217;s ldif file:</p>
<pre class="chili"><code class=""">dn: cn=cmoates,ou=Group,dc=mox,dc=net
objectClass: posixGroup
objectClass: top
cn: cmoates
gidNumber: 25001
memberUid: cmoates

dn: uid=cmoates,ou=People,dc=mox,dc=net
uid: cmoates
cn: Chris Moates
givenName: Chris
sn: Moates
mail: myemailaddress@mox.net
loginShell: /bin/bash
uidNumber: 25001
gidNumber: 25001
userPassword: testpass
homeDirectory: /home/net/cmoates
telephoneNumber: 7171234567
mobile: 7172345678
street: 123 Main Street
l: Anytown
st: PA
postalCode: 12345
objectClass: top
objectClass: hostObject
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: posixAccount
objectClass: shadowAccount
host: *</code></pre>
<p>I add this the same way as the others above, with:</p>
<pre class="chili"><code class=""">ldapadd -x -W -D cn=Manager,dc=mox,dc=net &lt; cmoates.ldif</code></pre>
<p>And voila, I&#8217;m in the LDAP directory.</p>
<p>On a Fedora/CentOS client, you simply need to run &#8220;authconfig-tui&#8221; as root from a shell. Check the LDAP options, and it will ask you for the name of your LDAP server. Fill in the blanks, and afterwards, you should be able to do something like:</p>
<pre class="chili"><code class=""">[root@bob ~]# id cmoates
uid=25001(cmoates) gid=25001(cmoates) groups=25001(cmoates)</code></pre>
<p>If that works, you&#8217;re all set. SSH in as that user, using the password in LDAP. Note that the password is clear text. That&#8217;s simply for my own ease of use. You can then have the user change their password and it will crypt it automatically.</p>
<p>So, I hope that&#8217;s at least a start on this topic. Please let me know what problems you have with these instructions, and I&#8217;ll be glad to amend them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mox.net/2009/02/20/openldap-isnt-really-all-that-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Being a good OSS contributor</title>
		<link>http://www.mox.net/2009/02/12/being-a-good-oss-contributor/</link>
		<comments>http://www.mox.net/2009/02/12/being-a-good-oss-contributor/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 01:38:43 +0000</pubDate>
		<dc:creator>cmoates</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Cobbler]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Koan]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[Puppet]]></category>

		<guid isPermaLink="false">http://www.mox.net/?p=9</guid>
		<description><![CDATA[While I realize that it&#8217;s not within everyone&#8217;s means, working on open source projects means you want to help others. Helping others includes doing at least some work to test across platforms (especially 32 vs 64 bit, where appropriate). Why isn&#8217;t there a distro out there that makes it trivially simple to set up VM&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>While I realize that it&#8217;s not within everyone&#8217;s means, working on open source projects means you want to help others. Helping others includes doing at least some work to test across platforms (especially 32 vs 64 bit, where appropriate).</p>
<p>Why isn&#8217;t there a distro out there that makes it trivially simple to set up VM&#8217;s of all the various popular Linux (and perhaps Solaris/*BSD?) distributions, for the purposes of testing?</p>
<p>I&#8217;ve been working with my friend Todd for a few days now to set something like this up. We&#8217;re using Fedora 10, Cobbler, Koan, OpenLDAP, Puppet, and a big honkin&#8217; box. So far, so good.</p>
<p>I should add that the first box purchased to do this included an Intel Q8200 quad core processor. Now, being a reasonably new processor, those of us who aren&#8217;t hardware news junkies would think that this CPU would support the VT flag which allows for things like KVM to work. Not so! Apparently the entire Q8xxx line has been castrated in this manner. So, I returned that machine and picked up a Phenom X4 instead. It runs like a champ, and being my first AMD purchase in awhile, I&#8217;m not disappointed.</p>
<p>I&#8217;m hoping to find the time to document some of what we are doing to get all this running. Stay tuned and cross your fingers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mox.net/2009/02/12/being-a-good-oss-contributor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

