<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Sébastien Wains</title>
	
	<link>http://www.wains.be</link>
	<description>Linux, Open Source, VoIP and other stuff</description>
	<lastBuildDate>Tue, 09 Feb 2010 21:21:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/wains" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="wains" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Tool of the day : etckeeper</title>
		<link>http://www.wains.be/index.php/2010/02/09/tool-of-the-day-etckeeper/</link>
		<comments>http://www.wains.be/index.php/2010/02/09/tool-of-the-day-etckeeper/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 21:21:19 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=982</guid>
		<description><![CDATA[http://joey.kitenet.net/code/etckeeper/
etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades. It tracks file metadata that revison control systems do not normally support, but that [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://joey.kitenet.net/code/etckeeper/">http://joey.kitenet.net/code/etckeeper/</a></p>
<p><code>etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades. It tracks file metadata that revison control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It's quite modular and configurable, while also being simple to use if you understand the basics of working with revision control.</code></p>
<p>Under Debian Lenny :</p>
<p>Install :</p>
<p><code>apt-get install etckeeper</code></p>
<p>Set ut the git repository (git is the default repository system, see /etc/etckeeper/etckeeper.conf if you want to change that) :</p>
<p><code>cd /etc<br />
etckeeper init<br />
etckeeper commit "initial import"</code></p>
<p>We&#8217;re done with the initial setup..</p>
<p>If you install a package through apt-get or aptitude, changes will be automatically commited.</p>
<p>If you made changes to files under /etc, commit them by doing :</p>
<p><code>git commit -a</code></p>
<p>Also, you can install trac-git, which provides a user friendly web interface to browse your git repository.</p>
<img src="http://feeds.feedburner.com/~r/wains/~4/bidxNGB3DQA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/02/09/tool-of-the-day-etckeeper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk Wake Up call application</title>
		<link>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/</link>
		<comments>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:00:54 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=977</guid>
		<description><![CDATA[If you want to be awaken by your Asterisk PBX, here&#8217;s a simple bit of code to add in your dial plan.
Basically, you would call 9253 followed by the time the phone should ring, for exemple if you want to be awaken at 06:30am you would call 92530630 (on your dialpad WAKE0610).
This code only allows [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to be awaken by your Asterisk PBX, here&#8217;s a simple bit of code to add in your dial plan.</p>
<p>Basically, you would call 9253 followed by the time the phone should ring, for exemple if you want to be awaken at 06:30am you would call 92530630 (on your dialpad WAKE0610).</p>
<p>This code only allows to set ONE alarm.</p>
<p>If you want to delete -for exemple the 0630am- alarm, you would call 6692530610 (on dialpad NOWAKE0610).</p>
<p>Asterisk will create a call file and put it under /var/spool/asterisk/outgoing/<br />
How does Asterisk know when to call you ? It will check the timestamp of the call files.</p>
<p>Make sure you enable func_strings.so module, it is required for STRFTIME.</p>
<pre><code>[Context-This-Code-Should-Go-In]

; WAKE + hour + minute : sets a wake up call
exten =&gt; _9253XXXX,1,Answer()
exten =&gt; _9253XXXX,n,Set(wakeuptime=${EXTEN:4:4})
exten =&gt; _9253XXXX,n,Set(today=${STRFTIME(${EPOCH},,%Y%m%d)})
exten =&gt; _9253XXXX,n,Set(tomorrow=${STRFTIME($[${EPOCH} + 86400],,%Y%m%d)})
exten =&gt; _9253XXXX,n,Set(now=${STRFTIME(${EPOCH},,%Y%m%d%H%M)})
exten =&gt; _9253XXXX,n,System(echo -e "Channel: SIP/${CALLERID(num)}\\nContext: WakeUp\\nExtension: 92531" &gt; /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,GotoIf($["${today}${wakeuptime}" &lt; "${now}"]?tomorrow:today)
exten =&gt; _9253XXXX,n(today),NoOp(Scheduling wake up call for ${CALLERID(num)} today at ${wakeuptime} / )
exten =&gt; _9253XXXX,n,System(touch -t ${today}${wakeuptime} /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,Goto(move)
exten =&gt; _9253XXXX,n(tomorrow),NoOp(Scheduling wake up call for ${CALLERID(num)} tomorrow at ${wakeuptime} / )
exten =&gt; _9253XXXX,n,System(touch -t ${tomorrow}${wakeuptime} /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n(move),System(mv /tmp/${UNIQUEID}.call /var/spool/asterisk/outgoing/${wakeuptime}.${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,Wait(1)
exten =&gt; _9253XXXX,n,SayNumber(${wakeuptime})
exten =&gt; _9253XXXX,n,Hangup()

; NOWAKE + hour + minute : deletes a wake up call
exten =&gt; _669253XXXX,1,Answer()
exten =&gt; _669253XXXX,n,Set(wakeuptime=${EXTEN:6:4})
exten =&gt; _669253XXXX,n,NoOp(Deleting alarm set at ${wakeuptime})
exten =&gt; _669253XXXX,n,System(rm -f /var/spool/asterisk/outgoing/${wakeuptime}*)
exten =&gt; _669253XXXX,n,Wait(1)
exten =&gt; _669253XXXX,n,Background(auth-thankyou)
exten =&gt; _669253XXXX,n,Hangup()

[WakeUp]
;;; Context for outgoing wake up calls only, well you can always call 92531 but it's rather pointless
exten =&gt; 92531,1,Answer()
exten =&gt; 92531,n,Wait(1)
exten =&gt; 92531,n,Background(hello-world)
exten =&gt; 92531,n,Wait(1)
exten =&gt; 92531,n,Hangup()</code></pre>
<img src="http://feeds.feedburner.com/~r/wains/~4/2uvWREP2Nzw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A basic OpenLDAP server in under 15 minutes</title>
		<link>http://www.wains.be/index.php/2010/01/28/a-basic-openldap-server-in-under-15-minutes/</link>
		<comments>http://www.wains.be/index.php/2010/01/28/a-basic-openldap-server-in-under-15-minutes/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 23:45:43 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=951</guid>
		<description><![CDATA[Tested under Debian Lenny
This howto is basic, as in &#8220;no security involved&#8221;. I may come up with a second part to this guide about securing OpenLDAP with TLS, if I ever find the time.
Meanwhile see http://www.openldap.org/doc/admin23/security.html for the security aspect of things.
In this example, I&#8217;ll create a tree following this scheme : dc=my,dc=domain,dc=tld.
It&#8217;s really up [...]]]></description>
			<content:encoded><![CDATA[<p><em>Tested under Debian Lenny</em></p>
<p>This howto is basic, as in &#8220;no security involved&#8221;. I may come up with a second part to this guide about securing OpenLDAP with TLS, if I ever find the time.<br />
Meanwhile see <a href="http://www.openldap.org/doc/admin23/security.html">http://www.openldap.org/doc/admin23/security.html</a> for the security aspect of things.</p>
<p>In this example, I&#8217;ll create a tree following this scheme : dc=my,dc=domain,dc=tld.<br />
It&#8217;s really up to you how you organize your tree, it&#8217;s really for organizational purposes. You can limit your tree to a single root branch, for example dc=myname.</p>
<p>Install OpenLDAP server and some useful utilities :</p>
<p><code># apt-get install slapd ldap-utils</code></p>
<p>You should be prompted for a password, if not create it from the command line :</p>
<p><code># slappasswd<br />
New password:<br />
Re-enter new password:<br />
{SSHA}vFk3EP4SSW0RDm4yEKD</code></p>
<p>Edit /etc/ldap/slapd.conf :</p>
<p>You should copy the password obtained with slappasswd under the rootpw option.</p>
<pre><code>include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
pidfile         /var/run/slapd/slapd.pid
argsfile        /var/run/slapd/slapd.args
loglevel        none
modulepath	/usr/lib/ldap
moduleload	back_hdb
sizelimit 500
tool-threads 1
backend		hdb
database        hdb
suffix          "dc=my,dc=domain,dc=tld"
rootdn          "cn=admin,dc=my,dc=domain,dc=tld"
rootpw		"{SSHA}vFk3EP4SSW0RDm4yEKD"
directory       "/var/lib/ldap"
dbconfig set_cachesize 0 2097152 0
dbconfig set_lk_max_objects 1500
dbconfig set_lk_max_locks 1500
dbconfig set_lk_max_lockers 1500
index           objectClass eq
lastmod         on
checkpoint      512 30
access to attrs=userPassword,shadowLastChange
        by dn="cn=admin,dc=my,dc=domain,dc=tld" write
        by anonymous auth
        by self write
        by * none
access to dn.base="" by * read
access to *
        by dn="cn=admin,dc=my,dc=domain,dc=tld" write
        by * read</code></pre>
<p>&#8220;cn=admin,dc=my,dc=domain,dc=tld&#8221; is the database admin. This is what you will use as credential when you need to modify something in the database.</p>
<p>Then edit /etc/ldap/ldap.conf :</p>
<p>This is the configuration for the LDAP client.</p>
<p><code>HOST 127.0.0.1<br />
BASE dc=my,dc=domain,dc=tld<br />
URI ldap://localhost</code></p>
<p>Now create a directory that will contain some initial configuration files.</p>
<p><code># mkdir /etc/ldap/LDIF</code></p>
<p>In this directory create the following files :</p>
<p>1_base.ldif (the base of our LDAP tree) :</p>
<p><code>dn: dc=my,dc=domain,dc=tld<br />
dc: my<br />
objectClass: domain</code></p>
<p>2_group.ldif (this will be the branch that will host our groups) :</p>
<p><code>dn: ou=Groups,dc=my,dc=domain,dc=tld<br />
ou: Groups<br />
objectClass: organizationalUnit</code></p>
<p>3_dev.ldif (this is our first group) :</p>
<p><code>dn: cn=dev,ou=Groups,dc=my,dc=domain,dc=tld<br />
cn: dev<br />
gidNumber: 30000<br />
memberUid: user1<br />
objectClass: posixGroup<br />
objectClass: top<br />
description: developers</code></p>
<p>4_people.ldif (this is the branch hosting users) :</p>
<p><code>dn: ou=People,dc=my,dc=domain,dc=tld<br />
ou: People<br />
objectClass: organizationalUnit</code></p>
<p>5_user1.ldif (this is our first user) :</p>
<p><code>dn: uid=user1,ou=People,dc=my,dc=domain,dc=tld<br />
uid: user1<br />
cn: John Doe<br />
displayName: John Doe<br />
givenName: Doe<br />
sn: Doe<br />
objectClass: inetOrgPerson<br />
userPassword: pass<br />
mail: johndoe@domain.tld</code></p>
<p>When we are done, we can restart OpenLDAP and create the tree and import some data :</p>
<p><code># /etc/init.d/slapd restart<br />
# cd /etc/ldap/LDIF<br />
# for i in `ls`; do ldapadd -x -D "cn=admin,dc=my,dc=domain,dc=tld" -W -f $i ; done</code></p>
<p>You should be prompted for the admin password as much as you have LDIF files in the directory.<br />
If you didn&#8217;t name your file 1_base.ldif, 2_group.ldif, etc. the command may fail as it may try to add a group or user before creating its branch.</p>
<p>Now you should be able to query the LDAP tree :</p>
<pre><code># ldapsearch -x
# extended LDIF
#
# LDAPv3
# base &lt;dc=my,dc=domain,dc=tld&gt; (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# my.domain.tld
dn: dc=my,dc=domain,dc=tld
dc: my
objectClass: domain

# Groups, my.domain.tld
dn: ou=Groups,dc=my,dc=domain,dc=tld
ou: Groups
objectClass: organizationalUnit

# People, my.domain.tld
dn: ou=People,dc=my,dc=domain,dc=tld
ou: People
objectClass: organizationalUnit

# user1, People, my.domain.tld
dn: uid=user1,ou=People,dc=my,dc=domain,dc=tld
uid: user1
cn: John Doe
displayName: John Doe
givenName: Doe
sn: Doe
objectClass: inetOrgPerson
mail: johndoe@domain.tld

# dev, Groups, my.domain.tld
dn: cn=dev,ou=Groups,dc=my,dc=domain,dc=tld
cn: dev
gidNumber: 30000
memberUid: user1
objectClass: posixGroup
objectClass: top
description: developers

# search result
search: 2
result: 0 Success

# numResponses: 6
# numEntries: 5</code></pre>
<p>This command requires /etc/ldap/ldap.conf. If you don&#8217;t have ldap.conf configured you&#8217;d have to type the whole command :</p>
<p><code># ldapsearch -x -b "dc=my,dc=domain,dc=tld" -H ldap://server</code></p>
<p>Now, you can authenticate several services against your new LDAP server.<br />
For example, web authentication in Apache.. Take a look at <a href="http://www.wains.be/index.php/2010/01/26/apache-simple-authentication-and-ldap-authentication-examples/">http://www.wains.be/index.php/2010/01/26/apache-simple-authentication-and-ldap-authentication-examples/</a></p>
<p>You also may want to install PHP LDAP Admin for managing your LDAP database through a web GUI :</p>
<p><code># apt-get install phpldapadmin</code></p>
<p>Then go to http://server/phpldapadmin and authentify with cn=admin,dc=my,dc=domain,dc=tld and your rootpw.</p>
<img src="http://feeds.feedburner.com/~r/wains/~4/6dd5TMLbg0Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/28/a-basic-openldap-server-in-under-15-minutes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Apache : simple authentication and LDAP authentication examples</title>
		<link>http://www.wains.be/index.php/2010/01/26/apache-simple-authentication-and-ldap-authentication-examples/</link>
		<comments>http://www.wains.be/index.php/2010/01/26/apache-simple-authentication-and-ldap-authentication-examples/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 09:29:26 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[LDAP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=940</guid>
		<description><![CDATA[Simple authentication :
Users credentials are stored in a file created with htpasswd command
&#60;Location /dir/&#62;
	AuthType Basic
	AuthName "Authentication"
	AuthUserFile /etc/apache2/passwd-file
	Require user username1 username2
&#60;/Location&#62;
If we want to allow all users in passwd-file, use :
Require valid-user
LDAP user authentication :
We allow user1 and user2 found in the branch ou=People,dc=domain,dc=tld
&#60;Location /dir/&#62;
        AuthName "Authentication"
   [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Simple authentication :</strong></p>
<p>Users credentials are stored in a file created with htpasswd command</p>
<p><code>&lt;Location /dir/&gt;<br />
	AuthType Basic<br />
	AuthName "Authentication"<br />
	AuthUserFile /etc/apache2/passwd-file<br />
	Require user username1 username2<br />
&lt;/Location&gt;</code></p>
<p>If we want to allow all users in passwd-file, use :<br />
<code>Require valid-user</code></p>
<p><strong>LDAP user authentication :</strong></p>
<p>We allow user1 and user2 found in the branch ou=People,dc=domain,dc=tld</p>
<p><code>&lt;Location /dir/&gt;<br />
        AuthName "Authentication"<br />
        AuthType Basic<br />
        AuthBasicProvider ldap<br />
        AuthzLDAPAuthoritative on<br />
        AuthLDAPURL ldap://127.0.0.1/ou=People,dc=domain,dc=tld<br />
        Require ldap-user user1 user2<br />
&lt;/Location&gt;</code></p>
<p><strong>LDAP group authentication :</strong></p>
<p>We allow all users in the group &#8220;support&#8221;, users are defined in that group under the memberUid field</p>
<p><code>&lt;Location /dir/&gt;<br />
        AuthName "Authentication"<br />
        AuthType Basic<br />
        AuthBasicProvider ldap<br />
        AuthzLDAPAuthoritative on<br />
        AuthLDAPURL ldap://127.0.0.1/ou=People,dc=domain,dc=tld<br />
        AuthLDAPGroupAttribute memberUid<br />
        AuthLDAPGroupAttributeIsDN off<br />
        Require ldap-group cn=support,ou=Groups,dc=domain,dc=tld<br />
&lt;/Location&gt;</code></p>
<p><strong>Combination of users and group :</strong></p>
<p><code>&lt;Location /dir/&gt;<br />
        AuthName "Authentication"<br />
        AuthType Basic<br />
        AuthBasicProvider ldap<br />
        AuthzLDAPAuthoritative on<br />
        AuthLDAPURL ldap://127.0.0.1/ou=People,dc=domain,dc=tld<br />
        AuthLDAPGroupAttribute memberUid<br />
        AuthLDAPGroupAttributeIsDN off<br />
	Require ldap-group  cn=support,ou=Groups,dc=domain,dc=tld<br />
	Require ldap-attribute gidNumber=10000<br />
	Require ldap-user user1 user3 user5<br />
&lt;/Location&gt;</code></p>
<p><strong>See also :</strong></p>
<p>- Conditional web authentication : <a href="http://www.wains.be/index.php/2007/01/27/apache-conditional-http-authentication/">http://www.wains.be/index.php/2007/01/27/apache-conditional-http-authentication/</a></p>
<p>- Source for this post : <a href="http://www.linux.com/archive/feature/120050?theme=print">http://www.linux.com/archive/feature/120050?theme=print</a></p>
<p>Keith in his post is wrong about the &#8220;<strong>Satisfy Any</strong>&#8221; option, as explained in Apache documentation : <a href="http://httpd.apache.org/docs/2.0/mod/core.html#satisfy">http://httpd.apache.org/docs/2.0/mod/core.html#satisfy</a> :</p>
<p><code>This directive is only useful if access to a particular area is being restricted <strong>by both username/password and client host address</strong>. In this case the default behavior (All) is to require that the client passes the address access restriction and enters a valid username and password. With the Any option the client will be granted access if they either pass the host restriction or enter a valid username and password.</code></p>
<p>He seems to explain that the &#8220;Satisfy Any&#8221; option is necessary when using several &#8220;Require&#8221; arguments. That&#8217;s incorrect, all Require arguments are evaluated by default and must pass checks to give access to the resource.</p>
<img src="http://feeds.feedburner.com/~r/wains/~4/F_Rpjuj_zFs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/26/apache-simple-authentication-and-ldap-authentication-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Local user authentication with FreeRADIUS</title>
		<link>http://www.wains.be/index.php/2010/01/25/local-user-authentication-with-freeradius/</link>
		<comments>http://www.wains.be/index.php/2010/01/25/local-user-authentication-with-freeradius/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 19:26:47 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[RADIUS]]></category>
		<category><![CDATA[Wifi]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=934</guid>
		<description><![CDATA[This one is a bit less complex than http://www.wains.be/index.php/2009/09/13/wpa2-freeradius-eap-tls/
This is actually the most basic RADIUS configuration ever, useful for quick tests. I can only recommend checking the post mentioned above if you want to do something serious. 
# apt-get install freeradius
# vim /etc/freeradius/users

login     Cleartext-Password := "password"
login2     Cleartext-Password [...]]]></description>
			<content:encoded><![CDATA[<p>This one is a bit less complex than <a href="http://www.wains.be/index.php/2009/09/13/wpa2-freeradius-eap-tls/">http://www.wains.be/index.php/2009/09/13/wpa2-freeradius-eap-tls/</a></p>
<p>This is actually the most basic RADIUS configuration ever, useful for quick tests. I can only recommend checking the post mentioned above if you want to do something serious. </p>
<p><code># apt-get install freeradius</code></p>
<pre><code># vim /etc/freeradius/users

login     Cleartext-Password := "password"
login2     Cleartext-Password := "password2"</code></pre>
<pre><code>#vim /etc/freeradius/clients.conf

client localhost {
	ipaddr = 127.0.0.1
        secret = radiuspassword
}

client router {
	ipaddr = 10.0.0.1
        secret = radiuspassword
}</code></pre>
<p><code># /etc/init.d/freeradius restart</code></p>
<p>Check if RADIUS is working :</p>
<p><code># radtest login password localhost 1812 radiuspassword<br />
Sending Access-Request of id 222 to 127.0.0.1 port 1812<br />
	User-Name = "login"<br />
	User-Password = "password"<br />
	NAS-IP-Address = 127.0.1.1<br />
	NAS-Port = 1812<br />
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=222, length=20</code></p>
<p><code># radtest login2 password2 localhost 1812 radiuspassword<br />
Sending Access-Request of id 1 to 127.0.0.1 port 1812<br />
	User-Name = "login2"<br />
	User-Password = "password2"<br />
	NAS-IP-Address = 127.0.1.1<br />
	NAS-Port = 1812<br />
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=1, length=20</code></p>
<p>We expect Access-Accept from the server, not Access-Reject&#8230;</p>
<p><strong>Configure your wireless access point :</strong></p>
<p>Usually found under Security tab (or RADIUS, 802.1X, etc.)<br />
Configure your device at 10.0.0.1 to authenticate against the Radius server with password radiuspassword.<br />
Try to connect to your wireless access point using login and password.</p>
<img src="http://feeds.feedburner.com/~r/wains/~4/M6ff1uwfzV8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/25/local-user-authentication-with-freeradius/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postfix + virtual users/groups/aliases stored in LDAP</title>
		<link>http://www.wains.be/index.php/2010/01/25/postfix-virtual-usersgroupsaliases-stored-in-ldap/</link>
		<comments>http://www.wains.be/index.php/2010/01/25/postfix-virtual-usersgroupsaliases-stored-in-ldap/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 18:29:40 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Postfix]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=925</guid>
		<description><![CDATA[This will just explain the configuration files needed for Postfix to check against the LDAP server.
We want to be able to send emails to username@domain.tld
We also want to have aliases for our users, for example : firstname.lastname@domain.tld pointing to username@domain.tld
Finally, we want groups to act as a mailing list, forwarding emails to members of the [...]]]></description>
			<content:encoded><![CDATA[<p>This will just explain the configuration files needed for Postfix to check against the LDAP server.</p>
<p>We want to be able to send emails to username@domain.tld<br />
We also want to have aliases for our users, for example : firstname.lastname@domain.tld pointing to username@domain.tld<br />
Finally, we want groups to act as a mailing list, forwarding emails to members of the group, for example : support@domain.tld</p>
<p><strong>LDAP tree</strong></p>
<pre><code>dc=domain,dc=tld
|-------ou=Aliases,dc=domain,dc=tld
|---------------cn=support,ou=Aliases,dc=domain,dc=tld
|
|		cn : support
|		description : alias support
|		gidNumber : 50000
|		mailRoutingAddress : support@domain.tld
|		memberUid : it (this is a group with a inetLocalMailRecipient class and a mailRoutingAddress field defined)
|		memberUid : username3 (this is a user account)
|
|-------ou=Groups,dc=domain,dc=tld
|---------------cn=it,ou=Groups,dc=domain,dc=tld
|
|		cn : it
|		description : IT dept group
|		gidNumber : 40000
|		mailRoutingAddress : it@domain.tld
|		memberUid : username1
|		memberUid : username2
|
|-------ou=Users,dc=domain,dc=tld
|---------------uid=username1,ou=Users,dc=domain,dc=tld

		cn : username1
		gecos : John Doe
		gidNumber : 10000
		homeDirectory : /home/username1
		mail : john.doe@domain.tld
		mailLocalAddress : john.doe
		uid : username1
		[...]</code></pre>
<p><strong>Postfix configuration</strong></p>
<p>For this to work, we must define &#8220;<strong>append_at_myorigin = yes</strong>&#8221; in main.cf<br />
For group/alias emails to work, the group must have the <strong>inetLocalMailRecipient</strong> class and <strong>mailRoutingAddress</strong> defined</p>
<p>So we basically add in main.cf :<br />
<code>virtual_alias_maps = ldap:/etc/postfix/ldap-account.cf, ldap:/etc/postfix/ldap-group.cf, ldap:/etc/postfix/ldap-alias.cf</code></p>
<p>It means that Postfix will check ldap-account.cf first, then ldap-group.cf and finally ldap-alias.cf.</p>
<p>So we create those files :</p>
<p>ldap-account.cf (for virtual users) :</p>
<p><code>server_host = localhost<br />
port = 389<br />
version = 3<br />
search_base = ou=Users,dc=domain,dc=tld<br />
scope = sub<br />
# we search through the Users base for the recipient email address (%s)<br />
query_filter = (mail=%s)<br />
# if we find anything under ou=Users,dc=domain,dc=tld, we deliver to the account specified under "uid"<br />
# so basically, if we send an email to john.doe@domain.tld, we will find an entry, finally delivering the email to uid username1<br />
result_attribute = uid</code></p>
<p>ldap-alias.cf (for virtual aliases) :</p>
<p><code>server_host = localhost<br />
port = 389<br />
version = 3<br />
scope = sub<br />
# we search through the Aliases base...<br />
search_base = ou=Aliases,dc=domain,dc=tld<br />
# ...for the recipient email address (%s) specified under mailRoutingAddress field<br />
query_filter = mailRoutingAddress=%s<br />
# If we find anything, return memberUid, that can be accounts, groups, or aliases<br />
result_attribute = memberUid</code></p>
<p>ldap-group.cf (for virtual groups) :</p>
<p><code>server_host = localhost<br />
port = 389<br />
version = 3<br />
scope = sub<br />
# Same as aliases, but in a different base<br />
search_base = ou=Groups,dc=domain,dc=tld<br />
query_filter = mailRoutingAddress=%s<br />
result_attribute = memberUid</code></p>
<img src="http://feeds.feedburner.com/~r/wains/~4/ULwAgcDvnP4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/25/postfix-virtual-usersgroupsaliases-stored-in-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk : XMPP notifications for missed calls</title>
		<link>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/</link>
		<comments>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 16:57:38 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=884</guid>
		<description><![CDATA[Tester under Asterisk 1.4.21.
If someone calls and hangs up before leaving a voicemail (that means while the phone is ringing or during voicemail message), Asterisk will send a &#8220;missed call&#8221; notification by XMPP/Jabber.
/etc/asterisk/jabber.conf :
This file contains the info for Asterisk to connect to the Jabber server.
When restarting Asterisk, it will connect automatically and add contacts [...]]]></description>
			<content:encoded><![CDATA[<p>Tester under Asterisk 1.4.21.</p>
<p>If someone calls and hangs up before leaving a voicemail (that means while the phone is ringing or during voicemail message), Asterisk will send a &#8220;missed call&#8221; notification by XMPP/Jabber.</p>
<p><strong>/etc/asterisk/jabber.conf :</strong></p>
<p>This file contains the info for Asterisk to connect to the Jabber server.<br />
When restarting Asterisk, it will connect automatically and add contacts specified under buddy fields to its contact list.<br />
You can specify several accounts in this file, and use different accounts for different notifications, for example.<br />
From Asterisk CLI, there&#8217;s a command &#8220;jabber test&#8221; which would display the status of your contacts, this command only works with the account specified in the [asterisk] context.</p>
<pre><code>[general]
debug=no
autoprune=no ; this is important to set this to no, if set to yes and you don't specify any "buddy=" it will delete contacts from your buddy list
autoregister=yes        

[asterisk] ; must be called "asterisk" if we want the command "jabber test" to work
type=client
serverhost=jabber.example.org
username=pbx@example.org/pbx
secret=PASSWORD
port=5222
usetls=yes
usesasl=yes
buddy=youraccountreceivingnotifications@gmail.com
buddy=anotheraccountthatmayreceivenotifications@gmail.com
statusmessage=Asterisk XMPP bot. Don't talk to me, your messages would be lost forever.
timeout=100

[account2]
type=client
serverhost=jabber.example.org
username=anotheraccount@example.org/pbx
secret=PASSWORD
port=5222
usetls=yes
usesasl=yes
buddy=someoneelse@gmail.com
statusmessage=Asterisk XMPP bot. Don't talk to me, your messages would be lost forever.
timeout=100</code></pre>
<p><strong>/etc/asterisk/extensions.conf :</strong></p>
<p>When you pass the option &#8220;g&#8221; to the Dial() command, when the user hangs up, Asterisk exits the Dial() command and continue by jumping to the special &#8220;h&#8221; extension in the current context. From the console you should expect something like &#8220;Spawn extension (macro-DialVM, h, 5) exited&#8221; when the whole thing has been processed.</p>
<p>If you don&#8217;t specify the option, Asterisk will exit at the Dial() command. You would then see &#8220;Spawn extension (macro-DialVM, s, 1) exited&#8221; right after the user hangs up.</p>
<p>In this bit of dialplan, we enable XMPP notifications for calls made on extension 555 in the context named Local.<br />
Dialing is made through a macro called macro-DialVM.<br />
XMPP notifications are sent through macro-XMPPSend.</p>
<pre><code>[macro-XMPPSend]
;;; Description : sends XMPP messages only if user is online and not away
;;; ARG1 = Jabber ID to be notified
;;; ARG2 = Message
;;; Jabberstatus and Jabbersend take the account name to user to send notifications as first argument ([asterisk] or [account2] under jabber.conf)

; getting user's status
; Status can be in order : 1)Online, 2)Chatty, 3)Away, 4)XAway, 5)DND, 6)Offline, 7)Not in roster
exten =&gt; s,1,Jabberstatus(asterisk,${ARG1},STATUS)
; If the value of STATUS is anything under 3 (or Away), in other words if user is Online or in Chatty mode
exten =&gt; s,n,GotoIf($["${STATUS}" &lt; "3"]?available:unavailable)
; then we send a message
exten =&gt; s,n(available),NoOp(${ARG1} is available)
exten =&gt; s,n,Jabbersend(asterisk,${ARG1},${ARG2})
exten =&gt; s,n,MacroExit()
; if the user is not available, we don't send anything
exten =&gt; s,n(unavailable),NoOp(${ARG1} is not available in at least one location.. Do not send notification)
exten =&gt; s,n,MacroExit()

[macro-DialVM]
;;; Description : dials (option g enabled, jumps to h extension) and goes to voicemail if reaching timeout.
;;; ARG1 = extension to be dialed
;;; ARG2 = timeout
;;; XMPP notification if call missed

exten =&gt; s,1,Dial(SIP/${ARG1},${ARG2},wg)
exten =&gt; s,n,Voicemail(${ARG1})

; option g must be passed to Dial() to jump to h extension or it would spawn at "macro-DialVM,s,1"
; if user doesn't leave a voicemail, VMSTATUS = FAILED
; if user hangs up before reaching the voicemail app, DIALSTATUS = CANCEL
exten =&gt; h,1,NoOp(Did user hang up before leaving a voicemail ?)
exten =&gt; h,n,GotoIf($["${VMSTATUS}" = "FAILED"]?missed:nextcheck)
exten =&gt; h,n(nextcheck),GotoIf($["${DIALSTATUS}" = "CANCEL"]?missed:notmissed)
exten =&gt; h,n(missed),Macro(XMPPSend,youraccountreceivingnotifications@gmail.com,${CALLERID(all)} just tried to call ${ARG1})
exten =&gt; h,n(notmissed),Hangup()

[Local]
;;; Description : Local calls context

; My extension is 555, with a timeout of 30 seconds
exten =&gt; 555,1,Macro(DialVM,${EXTEN},30)</code></pre>
<img src="http://feeds.feedburner.com/~r/wains/~4/cQaSINDJvsA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing TRAC with Apache2 and mod-python on Debian Lenny</title>
		<link>http://www.wains.be/index.php/2010/01/20/installing-trac-with-apache2-and-mod-python-on-debian-lenny/</link>
		<comments>http://www.wains.be/index.php/2010/01/20/installing-trac-with-apache2-and-mod-python-on-debian-lenny/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 15:59:49 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Versioning]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=865</guid>
		<description><![CDATA[This is based on a fresh install.
Install the necessary stuff :
# apt-get install apache2 subversion trac
# apt-get install libapache2-svn
libapache2-svn will enable dav and dav_fs modules.
More stuff :
# apt-get install libapache2-mod-python
Create your directories for TRAC environments (/home/trac/), projects source files (/home/dev/) and SVN repositories (/home/svn/) :
# mkdir /home/{trac,dev,svn}
Create your first project :
# mkdir /home/dev/project1
# echo "&#60;?php [...]]]></description>
			<content:encoded><![CDATA[<p>This is based on a fresh install.</p>
<p>Install the necessary stuff :</p>
<p><code># apt-get install apache2 subversion trac<br />
# apt-get install libapache2-svn</code></p>
<p>libapache2-svn will enable dav and dav_fs modules.</p>
<p>More stuff :</p>
<p><code># apt-get install libapache2-mod-python</code></p>
<p>Create your directories for TRAC environments (/home/trac/), projects source files (/home/dev/) and SVN repositories (/home/svn/) :</p>
<p><code># mkdir /home/{trac,dev,svn}</code></p>
<p>Create your first project :</p>
<p><code># mkdir /home/dev/project1<br />
# echo "&lt;?php phpinfo() ?&gt;" &gt; /home/dev/project1/index.php</code></p>
<p>Create the SVN repository for the project :</p>
<p><code># svnadmin create /home/svn/project1</code></p>
<p>Import the project into the SVN repository :</p>
<pre><code># svn import -m "Initial import" /home/dev/project1/ file:///home/svn/project1/
Adding         /home/dev/project1/index.php

Committed revision 1.</code></pre>
<p>Move your sources to a safe place, while we checkout the project :</p>
<p><code># mv /home/dev/project1 /home/dev/project1-orig</code></p>
<p>Checkout the project :</p>
<p><code># svn checkout file:///home/svn/project1 /home/dev/project1<br />
A    /home/dev/project1/index.php<br />
Checked out revision 1.</code></p>
<p>Make sure the project is now under revision, you should see a &#8220;.svn&#8221; directory :</p>
<p><code># ls -lah /home/dev/project1<br />
total 16K<br />
drwxr-xr-x 3 root root 4.0K Jan 20 12:42 .<br />
drwxr-xr-x 4 root root 4.0K Jan 20 12:42 ..<br />
drwxr-xr-x 6 root root 4.0K Jan 20 12:42 .svn<br />
-rw-r--r-- 1 root root   19 Jan 20 12:42 index.php</code></p>
<p>It&#8217;s now safe to delete the copy not under revision :</p>
<p><code># rm -fr /home/dev/project1-orig/</code></p>
<p>Set up TRAC for your first project, in bold what you need to specify :</p>
<pre><code># trac-admin /home/trac/project1 initenv
Creating a new Trac environment at /home/trac/project1

Trac will first ask a few questions about your environment
in order to initialize and prepare the project database.

 Please enter the name of your project.
 This name will be used in page titles and descriptions.

Project Name [My Project]&gt; <strong>Project1</strong>

 Please specify the connection string for the database to use.
 By default, a local SQLite database is created in the environment
 directory. It is also possible to use an already existing
 PostgreSQL database (check the Trac documentation for the exact
 connection string syntax).

Database connection string [sqlite:db/trac.db]&gt; <strong>PRESS ENTER</strong>

 Please specify the type of version control system,
 By default, it will be svn.

 If you don't want to use Trac with version control integration,
 choose the default here and don't specify a repository directory.
 in the next question.

Repository type [svn]&gt; <strong>svn</strong>

 Please specify the absolute path to the version control
 repository, or leave it blank to use Trac without a repository.
 You can also set the repository location later.

Path to repository [/path/to/repos]&gt; <strong>/home/svn/project1</strong>

Creating and Initializing Project
 Installing default wiki pages
 TracSyntaxColoring imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSyntaxColoring
 TracChangeset imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracChangeset
 TracWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWiki
 WikiHtml imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiHtml
 TracRevisionLog imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRevisionLog
 TracFastCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFastCgi
 TracTicketsCustomFields imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTicketsCustomFields
 SandBox imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/SandBox
 WikiMacros imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiMacros
 TracUpgrade imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUpgrade
 TracBackup imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBackup
 TracAccessibility imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAccessibility
 RecentChanges imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/RecentChanges
 WikiDeletePage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiDeletePage
 TracNavigation imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNavigation
 TracImport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracImport
 TracModPython imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracModPython
 TracEnvironment imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracEnvironment
 TracBrowser imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBrowser
 WikiFormatting imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiFormatting
 TracPlugins imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPlugins
 WikiPageNames imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiPageNames
 TracNotification imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNotification
 TracInstall imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInstall
 TracIni imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracIni
 TracAdmin imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAdmin
 TracRss imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRss
 TracLogging imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLogging
 TracGuide imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracGuide
 WikiStart imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiStart
 TracQuery imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracQuery
 WikiNewPage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiNewPage
 CamelCase imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/CamelCase
 TracRoadmap imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRoadmap
 TracLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLinks
 TracStandalone imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracStandalone
 TracInterfaceCustomization imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInterfaceCustomization
 TracUnicode imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUnicode
 InterMapTxt imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterMapTxt
 TracPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPermissions
 TitleIndex imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TitleIndex
 WikiProcessors imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiProcessors
 InterWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterWiki
 TracCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracCgi
 TracTimeline imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTimeline
 InterTrac imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterTrac
 PageTemplates imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/PageTemplates
 TracTickets imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTickets
 TracSupport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSupport
 TracWorkflow imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWorkflow
 TracSearch imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSearch
 TracFineGrainedPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFineGrainedPermissions
 WikiRestructuredTextLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredTextLinks
 TracReports imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracReports
 WikiRestructuredText imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredText
 Indexing repository
 [1]
---------------------------------------------------------------------
Project environment for 'Project1' created.

You may now configure the environment by editing the file:

  /home/trac/project1/conf/trac.ini

If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:

  tracd --port 8000 /home/trac/project1

Then point your browser to http://localhost:8000/project1.
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web server).

The latest documentation can also always be found on the project
website:

http://trac.edgewall.org/

Congratulations</code></pre>
<p>The configuration is stored under /home/trac/project1/conf/trac.ini.</p>
<p>Create the password files for web authentication :</p>
<p><code># htpasswd -c /etc/apache2/passwd-trac yourusername</code></p>
<p>Set up Apache :</p>
<p><code># cp /etc/apache2/sites-available/default /etc/apache2/sites-available/projects</code></p>
<pre><code># vim /etc/apache2/sites-available/projects
&lt;VirtualHost *:80&gt;
    DocumentRoot /var/www/

    &lt;Directory /var/www/&gt;
        Order allow,deny
        Allow from all
    &lt;/Directory&gt;

    ### TRAC Root : http://server/trac or http://server/trac/

        # Rewrite ./trac to ./trac/
        RewriteEngine on
        RewriteRule ^(.*)\/trac$ $1/ [NC]

    &lt;Location /trac/&gt;
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonInterpreter main
        PythonOption TracEnvParentDir /home/trac
        PythonOption TracUriRoot /trac/
        SetEnv PYTHON_EGG_CACHE /tmp
    &lt;/Location&gt;

    ### TRAC Login : http://server/trac/*/login
    &lt;LocationMatch ^(/trac/[^/]+)?/login&gt;
        AuthType Basic
        AuthName "TRAC Login"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    &lt;/LocationMatch&gt;

    ### SVN repository : http://server/svn
    &lt;Location /svn&gt;
        DAV svn
        SVNParentPath /home/svn
        SVNListParentPath on

        AuthType Basic
        AuthName "SVN Repository"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    &lt;/Location&gt;
&lt;/VirtualHost&gt;</code></pre>
<p>Enable rewrite module :</p>
<p><code># a2enmod rewrite<br />
Enabling module rewrite.<br />
Run '/etc/init.d/apache2 restart' to activate new configuration!</code></p>
<p>Disable the default website :</p>
<p><code># a2dissite default<br />
Site default disabled.<br />
Run '/etc/init.d/apache2 reload' to activate new configuration!</code></p>
<p>Enable the newly configured website :</p>
<p><code># a2ensite projects<br />
Enabling site projects.<br />
Run '/etc/init.d/apache2 reload' to activate new configuration!</code></p>
<p>Restart Apache :</p>
<p><code># /etc/init.d/apache2 restart</code></p>
<p>Make sure Apache can read and write TRAC configuration files.<br />
This is a basic working example but you may want to do something more elaborate involving Set-GID or POSIX ACL.</p>
<p><code># chown -R www-data. /home/trac</code></p>
<p>Now go to http://server/trac, it should rewrite the URL to http://server/trac/ and display a list of available projects.</p>
<p><strong>WALLA <img src='http://www.wains.be/wp-content/plugins/tango/face-wink.png' alt=';)' class='wp-smiley' /> </strong></p>
<p>Please let me know if it works for you. Thanks.</p>
<p>Partially based on <a href="http://www.willamaze.eu/?p=732">http://www.willamaze.eu/?p=732</a></p>
<img src="http://feeds.feedburner.com/~r/wains/~4/E1rj-psonfk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/20/installing-trac-with-apache2-and-mod-python-on-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asterisk dependencies on Debian Lenny or Squeeze ??</title>
		<link>http://www.wains.be/index.php/2010/01/16/asterisk-dependencies-on-debian-lenny-or-squeeze/</link>
		<comments>http://www.wains.be/index.php/2010/01/16/asterisk-dependencies-on-debian-lenny-or-squeeze/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 23:07:05 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Debian/Ubuntu]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=858</guid>
		<description><![CDATA[Can someone explain why build-essential is a dependency of Asterisk under Lenny or Squeeze ? 
142 MB.. seriously ? Meanwhile Askozia fits on 30 MB, and that includes the OS.
# apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  asterisk-config asterisk-sounds-main binutils build-essential bzip2 ca-certificates cpp [...]]]></description>
			<content:encoded><![CDATA[<p>Can someone explain why build-essential is a dependency of Asterisk under Lenny or Squeeze ? </p>
<p>142 MB.. seriously ? Meanwhile <a href="http://www.askozia.com">Askozia</a> fits on 30 MB, and that includes the OS.</p>
<pre><code># apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  asterisk-config asterisk-sounds-main binutils build-essential bzip2 ca-certificates cpp cpp-4.3 debhelper dpkg-dev file g++ g++-4.3 gcc gcc-4.3 gettext gettext-base
  html2text intltool-debian libasound2 libc-client2007b libc6-dev libcap2 libcompress-raw-zlib-perl libcompress-zlib-perl libcurl3 libdigest-hmac-perl libdigest-sha1-perl
  libfile-remove-perl libgmp3c2 libgomp1 libgsm1 libidn11 libiksemel3 libio-compress-base-perl libio-compress-zlib-perl libio-stringy-perl libldap-2.4-2 libltdl3
  libmagic1 libmail-box-perl libmail-sendmail-perl libmailtools-perl libmime-types-perl libmpfr1ldbl libobject-realize-later-perl libogg0 libpci3 libperl5.10 libpq5
  libpri1.0 libradiusclient-ng2 libsensors3 libsnmp-base libsnmp15 libspeex1 libspeexdsp1 libsqlite0 libssh2-1 libstdc++6-4.3-dev libsys-hostname-long-perl libsysfs2
  libtimedate-perl libtonezone1 liburi-perl libuser-identity-perl libvorbis0a libvorbisenc2 libvpb0 linux-libc-dev make mlock module-assistant odbcinst1debian1 openssl
  patch perl perl-modules po-debconf ucf unixodbc vpb-driver-source
Suggested packages:
  ekiga ohphone twinkle kphone asterisk-doc asterisk-dev asterisk-h323 binutils-doc bzip2-doc cpp-doc gcc-4.3-locales dh-make debian-keyring g++-multilib g++-4.3-multilib
  gcc-4.3-doc libstdc++6-4.3-dbg gcc-multilib manpages-dev autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.3-multilib libmudflap0-4.3-dev libgcc1-dbg
  libgomp1-dbg libmudflap0-dbg cvs gettext-doc libasound2-plugins uw-mailutils glibc-doc libmime-tools-perl libhtml-tree-perl libhtml-format-perl spamassassin
  libmail-imapclient-perl lm-sensors speex libstdc++6-4.3-doc libwww-perl vpb-utils make-doc diff-doc perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl
  libmyodbc odbc-postgresql libct1
The following NEW packages will be installed:
  asterisk asterisk-config asterisk-sounds-main binutils build-essential bzip2 ca-certificates cpp cpp-4.3 debhelper dpkg-dev file g++ g++-4.3 gcc gcc-4.3 gettext
  gettext-base html2text intltool-debian libasound2 libc-client2007b libc6-dev libcap2 libcompress-raw-zlib-perl libcompress-zlib-perl libcurl3 libdigest-hmac-perl
  libdigest-sha1-perl libfile-remove-perl libgmp3c2 libgomp1 libgsm1 libidn11 libiksemel3 libio-compress-base-perl libio-compress-zlib-perl libio-stringy-perl
  libldap-2.4-2 libltdl3 libmagic1 libmail-box-perl libmail-sendmail-perl libmailtools-perl libmime-types-perl libmpfr1ldbl libobject-realize-later-perl libogg0 libpci3
  libperl5.10 libpq5 libpri1.0 libradiusclient-ng2 libsensors3 libsnmp-base libsnmp15 libspeex1 libspeexdsp1 libsqlite0 libssh2-1 libstdc++6-4.3-dev
  libsys-hostname-long-perl libsysfs2 libtimedate-perl libtonezone1 liburi-perl libuser-identity-perl libvorbis0a libvorbisenc2 libvpb0 linux-libc-dev make mlock
  module-assistant odbcinst1debian1 openssl patch perl perl-modules po-debconf ucf unixodbc vpb-driver-source
0 upgraded, 83 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.3MB of archives.
After this operation, 142MB of additional disk space will be used.
Do you want to continue [Y/n]? </code></pre>
<p><strong>EDIT Janv. 30 :</strong></p>
<p>Thanks to Kurt for the tip in the comments.<br />
It completely went unnoticed to me, but Debian Lenny indeed installs &#8220;recommends&#8221; packages :</p>
<p><strong>To avoid the bloat caused by this new policy, edit /etc/apt/apt.conf and add :</strong><br />
<code>APT::Install-Recommends "0";</code></p>
<p>The result is clear : </p>
<pre><code># apt-get install asterisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  asterisk-config asterisk-sounds-main ca-certificates libasound2
  libc-client2007b libcap2 libcurl3 libgsm1 libidn11 libiksemel3 libldap-2.4-2
  libltdl3 libogg0 libpci3 libperl5.10 libpq5 libpri1.0 libradiusclient-ng2
  libsensors3 libsnmp-base libsnmp15 libspeex1 libspeexdsp1 libsqlite0
  libssh2-1 libsysfs2 libtonezone1 libvorbis0a libvorbisenc2 libvpb0 mlock
  odbcinst1debian1 openssl ucf unixodbc
Suggested packages:
  ekiga ohphone twinkle kphone asterisk-doc asterisk-dev asterisk-h323
  libasound2-plugins uw-mailutils lm-sensors speex vpb-utils libmyodbc
  odbc-postgresql libct1
Recommended packages:
  vpb-driver-source
The following NEW packages will be installed:
  asterisk asterisk-config asterisk-sounds-main ca-certificates libasound2
  libc-client2007b libcap2 libcurl3 libgsm1 libidn11 libiksemel3 libldap-2.4-2
  libltdl3 libogg0 libpci3 libperl5.10 libpq5 libpri1.0 libradiusclient-ng2
  libsensors3 libsnmp-base libsnmp15 libspeex1 libspeexdsp1 libsqlite0
  libssh2-1 libsysfs2 libtonezone1 libvorbis0a libvorbisenc2 libvpb0 mlock
  odbcinst1debian1 openssl ucf unixodbc
0 upgraded, 36 newly installed, 0 to remove and 13 not upgraded.
Need to get 14.0MB of archives.
After this operation, 33.2MB of additional disk space will be used.
Do you want to continue [Y/n]?</code></pre>
<img src="http://feeds.feedburner.com/~r/wains/~4/wCkCHCMKV8s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/16/asterisk-dependencies-on-debian-lenny-or-squeeze/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AFP server in under 15 minutes (Debian)</title>
		<link>http://www.wains.be/index.php/2010/01/14/afp-server-in-under-15-minutes-debian/</link>
		<comments>http://www.wains.be/index.php/2010/01/14/afp-server-in-under-15-minutes-debian/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 09:21:16 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Apple/Mac OS]]></category>
		<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=839</guid>
		<description><![CDATA[Tested under Debian Lenny 32 bits.
This howto is based on http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
Matthias&#8217; post is very comprehensive. This post is basically a raw copy paste of commands, if you want more information, go see Matthias post.
If you find this useful, please give credit to Matthias  
Why AFP (Apple Filing Protocol) ?
I wanted to see if AFP [...]]]></description>
			<content:encoded><![CDATA[<p><em>Tested under Debian Lenny 32 bits.</em></p>
<p>This howto is based on <a href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/">http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/</a><br />
Matthias&#8217; post is very comprehensive. This post is basically a raw copy paste of commands, if you want more information, go see Matthias post.<br />
If you find this useful, please give credit to Matthias <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Why AFP (<a href="http://en.wikipedia.org/wiki/Apple_Filing_Protocol">Apple Filing Protocol</a>) ?</strong></p>
<p>I wanted to see if AFP was faster than SMB.<br />
A quick test showed my Macbook (running OS 10.6.2) is transfering files 20 % faster on AFP than SMB.</p>
<p><strong>Build netatalk to support encryption </strong></p>
<p>Starting with Netatalk version 2.0.4 (and Debian Squeeze) you won&#8217;t need to rebuild to support SSL (see Frank&#8217;s comment).</p>
<p>Lenny comes with version 2.0.3 so we still need to go through recompilation (which I recommend doing on another box).</p>
<p><code># apt-get build-dep netatalk<br />
# apt-get install cracklib2-dev fakeroot libssl-dev<br />
# apt-get source netatalk<br />
# cd netatalk-2*<br />
# DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot</code></p>
<p><strong>Install modified version of netatalk</strong></p>
<p><code># dpkg -i ../netatalk_2*.deb<br />
# echo "netatalk hold" | dpkg --set-selections</code></p>
<p><strong>/etc/default/netatalk</strong></p>
<p><code>ATALKD_RUN=no<br />
PAPD_RUN=no<br />
CNID_METAD_RUN=yes<br />
AFPD_RUN=yes<br />
TIMELORD_RUN=no<br />
A2BOOT_RUN=no</code></p>
<p><strong>/etc/netatalk/afpd.conf</strong></p>
<p><code>- -transall -uamlist uams_dhx.so -nosavepassword</code></p>
<p><strong>/etc/netatalk/AppleVolumes.default</strong></p>
<p><code>/home/seb "Seb's share" allow:seb</code></p>
<p><strong>Start netatalk</strong></p>
<p><code>/etc/init.d/netatalk start</code></p>
<p><strong>Advertise the service with Avahi</strong></p>
<p>You can skip this step, but it&#8217;d mean the server doesn&#8217;t magically appear as a Shared drive in your Finder.</p>
<p><code>apt-get install avahi-daemon</code></p>
<p><strong>/etc/avahi/services/afpd.service</strong></p>
<p><code>&lt;?xml version="1.0" standalone='no'?&gt;<!--*-nxml-*--><br />
&lt;!DOCTYPE service-group SYSTEM "avahi-service.dtd"&gt;<br />
&lt;service-group&gt;<br />
&lt;name replace-wildcards="yes"&gt;%h AFP&lt;/name&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_afpovertcp._tcp&lt;/type&gt;<br />
&lt;port&gt;548&lt;/port&gt;<br />
&lt;/service&gt;<br />
&lt;service&gt;<br />
&lt;type&gt;_device-info._tcp&lt;/type&gt;<br />
&lt;port&gt;0&lt;/port&gt;<br />
&lt;txt-record&gt;model=Xserve&lt;/txt-record&gt;<br />
&lt;/service&gt;<br />
&lt;/service-group&gt;</code></p>
<p><code># /etc/init.d/avahi-daemon restart</code></p>
<p><strong>Firewall :</strong></p>
<p>Allow tcp/548 (netatalk) and tcp/5353 (avahi)</p>
<img src="http://feeds.feedburner.com/~r/wains/~4/Teh72Dr4hzY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/14/afp-server-in-under-15-minutes-debian/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
