<?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>Valentin's Lab &#187; ubuntu</title>
	<atom:link href="https://vaab.blog.kal.fr/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>https://vaab.blog.kal.fr</link>
	<description>Ratiocination of an opensource techie</description>
	<lastBuildDate>Thu, 15 Nov 2018 08:04:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F&amp;language=en_US&amp;category=text&amp;title=Valentin%27s+Lab&amp;description=Ratiocination+of+an+opensource+techie&amp;tags=blog" type="text/html" />
	<item>
		<title>simple gnome-terminal bomb</title>
		<link>https://vaab.blog.kal.fr/2010/11/23/simple-gnome-terminal-bomb/</link>
		<comments>https://vaab.blog.kal.fr/2010/11/23/simple-gnome-terminal-bomb/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 11:55:17 +0000</pubDate>
		<dc:creator><![CDATA[vaab]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://vaab.blog.kal.fr/?p=79</guid>
		<description><![CDATA[In the need of an (other) argument against gnome-terminal (as of version 2.30.2-0ubuntu1 in lucid) ? Run this command in a more than 200+ column wide terminal: for _c in $(seq 1 512); do for i in $(seq 1 $(stty &#8230;<p class="read-more"><a href="https://vaab.blog.kal.fr/2010/11/23/simple-gnome-terminal-bomb/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[<p>In the need of an (other) argument against gnome-terminal (as of version 2.30.2-0ubuntu1 in lucid) ?</p>
<p>Run this command in a more than 200+ column wide terminal:</p>
<pre>
for _c in $(seq 1 512); do
    for i in $(seq 1 $(stty size | cut -f 2 -d " ")); do
        echo -n x
    done
done
</pre>
<p>If your terminal is still responsive try to scroll up. If always responsive, try on widening window of gnome-terminal and relaunch the script.</p>
<p>This is a gnome-terminal bomb… If you want to test it without killing all your current gnome-terminal sessions you should launch a dummy instance with:</p>
<pre>
gnome-terminal --disable-factory
</pre>
<p>in any existing terminal. This will open a new windows that you can smash up safely.</p>
<p>The so-called "bomb" script will only display “x” all over the place on one big line (512 x column wide). Nothing big, it starts to collapse with much less chars on my computer.</p>
<p>Adding a line breaker will remove bomb effect:</p>
<pre>
for _c in $(seq 1 512); do
    for i in $(seq 1 $(stty size | cut -f 2 -d " ")); do
        echo -n x
    done
    echo
done
</pre>
<p>Both version of this code have the same visual output.<br />
And are displayed with same blistering speed on urxvt (and probably a bunch of other terminal).</p>
 <p><a href="https://vaab.blog.kal.fr/?flattrss_redirect&amp;id=79&amp;md5=d9611ac4ac78ae3bca544bdb0ef043dc" title="Flattr" target="_blank"><img src="https://vaab.blog.kal.fr/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>https://vaab.blog.kal.fr/2010/11/23/simple-gnome-terminal-bomb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F2010%2F11%2F23%2Fsimple-gnome-terminal-bomb%2F&amp;language=en_GB&amp;category=text&amp;title=simple+gnome-terminal+bomb&amp;description=In+the+need+of+an+%28other%29+argument+against+gnome-terminal+%28as+of+version+2.30.2-0ubuntu1+in+lucid%29+%3F+Run+this+command+in+a+more+than+200%2B+column+wide+terminal%3A+for+_c+in...&amp;tags=fun%2Cubuntu%2Cblog" type="text/html" />
	</item>
		<item>
		<title>How to add a schema in OpenLDAP 2.4</title>
		<link>https://vaab.blog.kal.fr/2010/03/06/how-to-add-a-schema-in-openldap-24/</link>
		<comments>https://vaab.blog.kal.fr/2010/03/06/how-to-add-a-schema-in-openldap-24/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 17:23:49 +0000</pubDate>
		<dc:creator><![CDATA[vaab]]></dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[openldap]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://vaab.blog.kal.fr/?p=34</guid>
		<description><![CDATA[In version prior to 2.4, administrators were used to configure slapd through its /etc/ldap/slapd.conf. That was good ol' time. Since version 2.4, slapd configuration is stored right in itself !. This may sound as a good idea, but is really &#8230;<p class="read-more"><a href="https://vaab.blog.kal.fr/2010/03/06/how-to-add-a-schema-in-openldap-24/">Read more &#187;</a></p>]]></description>
				<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>In version prior to 2.4, administrators were used to configure
<tt class="docutils literal">slapd</tt> through its <tt class="docutils literal">/etc/ldap/slapd.conf</tt>. That was good ol'
time.</p>
<p>Since version 2.4, <tt class="docutils literal">slapd</tt> configuration is stored right in
itself !. This may sound as a good idea, but is really
unpractical: administrators needs to really master LDAP now to
configure <tt class="docutils literal">slapd</tt>: use
<tt class="docutils literal">ldapmodify</tt>/<tt class="docutils literal">ldapsearch</tt>/<tt class="docutils literal">ldapadd</tt>, or delve into some
<a class="reference external" href="http://en.wikipedia.org/wiki/LDAP_Data_Interchange_Format">LDIF</a> files. Also, simple tasks (as adding a schema definition
to the server) are now quite tedious. Although the complete
configuration is accessible as <tt class="docutils literal">ldif</tt> files, I concider
<tt class="docutils literal">ldif</tt> file format as <tt class="docutils literal">XML</tt>: it's way too verbose and tedious
to read and be maintained by a human being. And above all, it's
yet another language to master.</p>
<p>In last Ubuntu as of 2010-03-06, this change was not correctly reported in LDAP
servers documentation. These are 2 bug reports on this issue:
<a class="reference external" href="https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/463684">Bug #463684</a>, <a class="reference external" href="https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/442498">Bug #442498</a>. A quick glance to these bug
reports will show you that this changement is a great source of
distress for a lot of casual administrators (as I am).</p>
<p>The <a class="reference external" href="http://doc.ubuntu.com/ubuntu/serverguide/C/openldap-server.html">last documentation from Ubuntu</a> has not explained the changes and is not that clear.</p>
<p><em>EDIT</em> (2012-01-05): the last link have now some valuable information despite the fact that it seems not anymore maintained. I would rather hint towards the <a class="reference external" href="https://help.ubuntu.com/community/OpenLDAPServer">community help site page on OpenLDAP</a> of ubuntu, which seems a natural and well documented point to get information.</p>
<div class="section" id="what-is-the-reason-behind-this-change">
<h3>What is the reason behind this change ?</h3>
<p>First, openldap changed it's default way to store configuration
files. The idea is simple: The configuration is stored in a
SEPARATE ldap database identified by the prefix &quot;cn=config&quot;. And
you'll be able to declare separate databases with different
credentials, or backend (<tt class="docutils literal">bdb</tt> or <tt class="docutils literal">hdb</tt> for instance).</p>
<p>With this new way of using the configuration, you can make
changes to configuration without restarting <tt class="docutils literal">slapd</tt>.</p>
<p><a class="reference external" href="https://lists.ubuntu.com/archives/ubuntu-server/2009-August/003182.html">This thread post</a> is quite clear on what is going at Ubuntu around OpenLDAP.</p>
</div>
<div class="section" id="how-to-use-the-config-database">
<h3>How to use the config database ?</h3>
<p>The configuration database does not need any password for root
system user on local connection. You can see its content with
<tt class="docutils literal">ldapsearch</tt> this way:</p>
<pre class="literal-block">
sudo ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config
</pre>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">if you are on ubuntu, ldapsearch is available in
<tt class="docutils literal"><span class="pre">ldap-utils</span></tt> package.</p>
</div>
<dl class="docutils">
<dt>This database contains roughly:</dt>
<dd><ul class="first last simple">
<li>some basic slapd daemon configuration parameters (pid file, loglevel ...)</li>
<li>loaded schemas</li>
<li>and databases configuration</li>
</ul>
</dd>
</dl>
<p>To make addition to this database you'll need to inject <tt class="docutils literal">ldif</tt>
files for example through <tt class="docutils literal">ldapadd</tt>:</p>
<pre class="literal-block">
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f file.ldif
</pre>
<p>Or, better, use tool like <a class="reference external" href="http://www.lichteblau.com/ldapvi/">ldapvi</a></p>
<pre class="literal-block">
sudo ldapvi -h ldapi:/// -D cn=config -Y EXTERNAL -b cn=config
</pre>
<dl class="docutils">
<dt>You'll need to make additions/modifications to this database to:</dt>
<dd><ul class="first last simple">
<li>add new schemas</li>
<li>add new databases (and you'll require to create at least one database)</li>
<li>add indexes to databases</li>
<li>modify LogLevel</li>
<li>...</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="how-to-add-a-new-schema">
<h3>How to add a new schema ?</h3>
<p>This is the common way to add a schema:</p>
<pre class="literal-block">
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
</pre>
</div>
<div class="section" id="how-to-add-a-new-database">
<h3>How to add a new database ?</h3>
<p>The following method will require that <tt class="docutils literal">nis</tt> schema was loaded as it defines rule
on the <tt class="docutils literal">shadowLastChange</tt> attribute that is defined in this schema.</p>
<p>Then copy-paste this code into a ldif file <tt class="docutils literal">/tmp/database.ldif</tt>:</p>
<pre class="literal-block">
# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=example,dc=com
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=example,dc=com
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn=&quot;cn=admin,dc=example,dc=com&quot; write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base=&quot;&quot; by * read
olcAccess: to * by dn=&quot;cn=admin,dc=example,dc=com&quot; write by * read
</pre>
<dl class="docutils">
<dt>You should change:</dt>
<dd><ul class="first last simple">
<li><tt class="docutils literal">dc=example,dc=com</tt> with your own prefix</li>
<li>'secret' value of <tt class="docutils literal">olcRootPW</tt> should be updated by your password.</li>
</ul>
</dd>
</dl>
<p><em>EDIT (2012-01-05):</em> You will have to remove the first part about loading the <tt class="docutils literal">hdb</tt> module if you are in recent ubuntu installation, as it is already loaded, and will trigger a fatal error preventing the following <tt class="docutils literal">ldapadd</tt> command to work as expected.</p>
<p><em>EDIT (2013-12-30):</em> An existing database was created by ubuntu before installation and can spew very annoying error message and block <tt class="docutils literal">slapcat</tt>. Unfortunately, you can't delete it with <tt class="docutils literal">ldapvi</tt>. The best way I found was to stop <tt class="docutils literal">slapd</tt>, then <tt class="docutils literal">cd /etc/ldap/slapd.d/cn=config</tt>, remove <tt class="docutils literal"><span class="pre">olcDatabase={1}hdb.ldif</span></tt> file, and relaunch <tt class="docutils literal">slapd</tt>. Please check that content of the file removed is the one mentionning <tt class="docutils literal">nodomain</tt>.</p>
<p>Once you've created this file, you can add your new database with:</p>
<pre class="literal-block">
sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/database.ldif
</pre>
<p>You can then remove <tt class="docutils literal">/tmp/database.ldif</tt>.</p>
<p>Notice that <tt class="docutils literal">slapcat</tt> should work only after having configured
a database. Without any database you'll get this error:</p>
<pre class="literal-block">
$ slapcat
Available database(s) do not allow slapcat
</pre>
<p>Because <tt class="docutils literal">cn=config</tt> database doesn't allow <tt class="docutils literal">slapcat</tt> and no
other database has been configured.</p>
</div>
</div>
 <p><a href="https://vaab.blog.kal.fr/?flattrss_redirect&amp;id=34&amp;md5=82e433160894aa833db9a0e550502ed0" title="Flattr" target="_blank"><img src="https://vaab.blog.kal.fr/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>https://vaab.blog.kal.fr/2010/03/06/how-to-add-a-schema-in-openldap-24/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=vaab&amp;popout=1&amp;url=https%3A%2F%2Fvaab.blog.kal.fr%2F2010%2F03%2F06%2Fhow-to-add-a-schema-in-openldap-24%2F&amp;language=en_GB&amp;category=text&amp;title=How+to+add+a+schema+in+OpenLDAP+2.4&amp;description=In+version+prior+to+2.4%2C+administrators+were+used+to+configure+slapd+through+its+%2Fetc%2Fldap%2Fslapd.conf.+That+was+good+ol%27+time.+Since+version+2.4%2C+slapd+configuration+is+stored+right+in+itself+%21....&amp;tags=openldap%2Cubuntu%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>
