<?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>Tuts4Tech &#187; ldap</title>
	<atom:link href="http://tuts4tech.net/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuts4tech.net</link>
	<description>Tech Tutorials</description>
	<lastBuildDate>Sun, 18 Jul 2010 01:41:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing PHPLdapAdmin To Manage Your Ldap Server</title>
		<link>http://tuts4tech.net/2009/07/03/installing-phpldapadmin-to-manage-your-ldap-server/</link>
		<comments>http://tuts4tech.net/2009/07/03/installing-phpldapadmin-to-manage-your-ldap-server/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 17:17:39 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[openldap]]></category>
		<category><![CDATA[phpldapadmin]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=427</guid>
		<description><![CDATA[I will be using lighttpd as the httpd apt-get install lighttpd php5-cgi php5-ldap php5-mhash Install PHPLdapAdmin apt-get install phpldapadmin Move your lighttpd.conf to lighttpd.conf.bak cd /etc/lighttpd mv lighttpd.conf lighttpd.conf.bak Then download this lighttpd.conf and restart lighttpd wget tuts4tech.net/files/lighttpd.conf /etc/init.d/lighttpd restart You should now be able to login to PHPLdapAdmin at http://server-ip:9090]]></description>
			<content:encoded><![CDATA[<ol>
<li>I will be using lighttpd as the httpd
<pre class="brush: plain;">apt-get install lighttpd php5-cgi php5-ldap php5-mhash</pre>
</li>
<li>Install PHPLdapAdmin
<pre class="brush: plain;">apt-get install phpldapadmin</pre>
</li>
<li>Move your lighttpd.conf to lighttpd.conf.bak
<pre class="brush: bash;">cd /etc/lighttpd
mv lighttpd.conf lighttpd.conf.bak</pre>
<p> Then download <a href="http://tuts4tech.net/files/lighttpd.conf">this lighttpd.conf</a> and restart lighttpd
<pre class="brush: plain;">wget tuts4tech.net/files/lighttpd.conf
/etc/init.d/lighttpd restart</pre>
</li>
<li>You should now be able to login to PHPLdapAdmin at http://server-ip:9090</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/07/03/installing-phpldapadmin-to-manage-your-ldap-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring LDAP Clients</title>
		<link>http://tuts4tech.net/2009/07/02/configuring-ldap-clients/</link>
		<comments>http://tuts4tech.net/2009/07/02/configuring-ldap-clients/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 02:59:42 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[slapd]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=419</guid>
		<description><![CDATA[Install Needed Packages We need to install the following packages on our LDAP server apt-get install libnss-ldap libpam-ldap nscd LDAP Account for root: cn=admin,dc=home,dc=local Password: your-ldap-admin-password Make local root database admin: yes Database require logging in: No Root login account: cn=admin,dc=home,dc=local Root login password: your-ldap-admin-password Configuration Files /etc/libnss-ldap.conf nano /etc/libnss-ldap.conf host IP-OF-LDAP-SERVER base dc=home,dc=local bind_policy [...]]]></description>
			<content:encoded><![CDATA[<h3>Install Needed Packages</h3>
<ol>
<li>We need to install the following packages on our LDAP server
<pre class="brush: bash;">apt-get install libnss-ldap libpam-ldap nscd</pre>
<p>
<pre class="brush: plain;">LDAP Account for root: cn=admin,dc=home,dc=local
Password: your-ldap-admin-password
Make local root database admin: yes
Database require logging in: No
Root login account: cn=admin,dc=home,dc=local
Root login password: your-ldap-admin-password </pre>
</li>
</ol>
<p><span id="more-419"></span>
<ol>
<h3>Configuration Files</h3>
<li>/etc/libnss-ldap.conf
<pre class="brush: plain;">nano /etc/libnss-ldap.conf</pre>
<p>
<pre class="brush: plain;">host IP-OF-LDAP-SERVER
base dc=home,dc=local
bind_policy soft
rootbinddn cn=admin,dc=home,dc=local</pre>
</li>
<li>/etc/pam_ldap.conf
<pre class="brush: plain;">/etc/pam_ldap.conf</pre>
<p>
<pre class="brush: plain;">host IP-OF-LDAP-SERVER
base dc=home,dc=local
rootbinddn cn=admin,dc=home,dc=local</pre>
</li>
<li>Now we need to add pam_ldap so some of the pam configs
<pre class="brush: plain;">nano /etc/pam.d/common-account
account sufficient pam_ldap.so
account required pam_unix.so
#if you want user homedir to be created on first login
#session required pam_mkhomedir.so umask=0022 skel=/etc/skel/ silent

nano /etc/pam.d/common-auth
auth sufficient pam_ldap.so
auth required pam_unix.so nullok_secure use_first_pass

nano /etc/pam.d/common-password
password sufficient pam_ldap.so
password required pam_unix.so nullok obscure min=4 max=8 md5

nano /etc/pam.d/common-session
session sufficient pam_ldap.so
session required pam_unix.so
session optional pam_foreground.so</pre>
</li>
<li>Finally we need to edit /etc/nsswitch.conf
<pre class="brush: bash;">nano /etc/nsswitch.conf</pre>
<p>
<pre class="brush: plain;">passwd:         compat ldap
group:          compat ldap
shadow:         compat ldap</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/07/02/configuring-ldap-clients/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to setup a LDAP Server</title>
		<link>http://tuts4tech.net/2009/07/01/how-to-setup-a-ldap-server/</link>
		<comments>http://tuts4tech.net/2009/07/01/how-to-setup-a-ldap-server/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 01:50:29 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[groups]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=403</guid>
		<description><![CDATA[Installation We need to install the ldap packages apt-get install slapd ldap-utils migrationtools Answer the questions and then use dpkg to reconfigure slapd for more options dpkg-reconfigure slapd Omit OpenLDAP server configuration? ... No DNS domain name: ... home.local Name of your organization: ... home Admin Password: some-really-strong-password Confirm Password: some-really-strong-password OK BDB Do you [...]]]></description>
			<content:encoded><![CDATA[<h3>Installation</h3>
<ol>
<li>We need to install the ldap packages
<pre class="brush: bash;">apt-get install slapd ldap-utils migrationtools</pre>
</li>
<li>Answer the questions and then use dpkg to reconfigure slapd for more options
<pre class="brush: bash;">dpkg-reconfigure slapd</pre>
<p>
<pre class="brush: plain;">Omit OpenLDAP server configuration? ... No
DNS domain name: ... home.local
Name of your organization: ... home
Admin Password: some-really-strong-password
Confirm Password: some-really-strong-password
OK
BDB
Do you want your database to be removed when slapd is purged? ... No
Move old database? ... Yes
Allow LDAPv2 Protocol? ... No </pre>
</li>
<li>Check that the ldap server is now running
<pre class="brush: bash;">ldapsearch -x -b dc=home,dc=local</pre>
<p>If you get this error 
<pre class="brush: plain;">ldap_bind: Can't contact LDAP server (-1)</pre>
<p>Its likely the daemon isn't running so start it
<pre class="brush: plain;">/etc/init.d/slapd start</pre>
</li>
</ol>
<p><span id="more-403"></span></p>
<h3>Populating the Database</h3>
<li>We can use migration tools to export all of our users and groups into the LDAP db switch into the migrations tools directory
<pre class="brush: bash;">cd /usr/share/migrationtools/</pre>
</li>
<li>Edit the migrations tools config file
<pre class="brush: bash;">nano migrate_common.ph</pre>
<p>and replace the following
<pre class="brush: plain;">DEFAULT_MAIL_DOMAIN = &quot;home.local&quot;;
DEFAULT_BASE = &quot;dc=home,dc=local&quot;;</pre>
</li>
<li>Export the users and groups
<pre class="brush: bash;">./migrate_group.pl /etc/group /tmp/group.ldif
./migrate_passwd.pl /etc/passwd /tmp/passwd.ldif </pre>
</li>
<li>Migrate tools doesn't create the group and people nodes therefore we need to create them open /tmp/nodes.ldif
<pre class="brush: bash;">nano /tmp/nodes.ldif</pre>
<p>and paste in the following
<pre class="brush: plain;">dn: ou=People, dc=home, dc=local
ou: People
objectclass: organizationalUnit

dn: ou=Group, dc=home, dc=local
ou: Group
objectclass: organizationalUnit</pre>
</li>
<li>Finally we need to import the entries into our LDAP database
<pre class="brush: plain;">ldapadd -x -W -D &quot;cn=admin,dc=home,dc=local&quot; -f /tmp/nodes.ldif
ldapadd -x -W -D &quot;cn=admin,dc=home,dc=local&quot; -f /tmp/group.ldif
ldapadd -x -W -D &quot;cn=admin,dc=home,dc=local&quot; -f /tmp/passwd.ldif </pre>
</li>
<p>That is your LDAP server setup In <a href="http://tuts4tech.net/2009/07/02/configuring-ldap-clients/">this tutorial</a> it will show you how to configure your LDAP Clients</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/07/01/how-to-setup-a-ldap-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
