Dec 03 2009

Samba/OpenLDAP Cheatsheet

List domain groups:

net groupmap list

Adding domain group:

smbldap-groupadd -a interchange

Adding user to domain group:

smbldap-groupmod -m racke interchange

Please restart Samba after adding domain groups or adding user to domain groups.

Dec 03 2009

OpenLDAP: TLS init def ctx failed: -207

Today I upgraded OpenLDAP in order to fix the insufficient input validation security problem (DSA-1943-1).
Unfortunately OpenLDAP refused to start after the upgrade.

After adding

loglevel config stats

to the configuration file it gave me at least the meaningful error message:

TLS init def ctx failed: -207.

Nov 06 2009

Open LDAP with SSL on Debian

First of all create a self-signed certificate by following the instructions at http://www.eclectica.ca/howto/ssl-cert-howto.php. I copied the private key and the certificates to /etc/ldap. Please make sure that the
private key is only readable by root.

Next add the following lines to /etc/ldap/slapd.conf:

TLSCaCertificateFile /etc/ldap/cacert.pem
TLSCertificateFile /etc/ldap/cert.pem
TLSCertificateKeyFile /etc/ldap/cert.key

Finally make sure that the LDAP server is listening at the ldaps port (636) by editing /etc/default/slapd
and restarting the LDAP server.

Oct 23 2009

Pure-FTPd 1.0.23 has been released

Version 1.0.23 has just been released.

Grab it from http://download.pureftpd.org/pub/pure-ftpd/releases/

This version should fix a lot of old-standing issues. Transfers are more
reliable and should flawlessly handle any kind of cancelation and
disconnection. Virtual quotas should also be way better than they used to be.
FTP over TLS is also more reliable, way faster than it used to be and
overall compatibility with clients has been greatly enhanced. Logging also
received some improvement.

Some limitations of the initial TLS support were also lifted, like the

Jul 14 2009

OpenERP for starters

First of all I installed OpenERP on a local machine:

  1. Install OpenERP server
  2. PostgreSQL user
  3. Install OpenERP client

The installation is documented at doc.openerp.com.

The server is installed as follows:

  1. install required packages
  2. download and unpack sources
  3. sudo python setup.py install

The installation neither adds an init script nor a configuration file.

Jul 03 2009

Using TLS with Exim on Debian

This article describes how to enable TLS support for Exim as server on Debian with the split configuration model. /usr/share/doc/exim4-config/README.Debian.gz already contains a fairly good description of that setup (currently in section 2.2).

First step is to put the SSL key and SSL certificate into /etc/exim4:


erebus:/etc/exim4# ls -l exim.*
-rw-r----- 1 root Debian-exim 960 2009-07-03 11:10 exim.crt
-rw-r----- 1 root Debian-exim 887 2009-07-03 11:10 exim.key

Jun 09 2009

Error Diagnosis on Pipe Transports

Maildrop exits in certain cases with exit code 75. This signals a temporary error to Exim, but no further
explanation can be learned from the exim log file:

2009-06-09 11:58:32 1MDy6C-0003Lm-Ky == racke@linuxia.de R=virtualuser T=vinson_virtualuser_drop defer (0): Child process of vinson_virtualuser_drop transport returned 75 (could mean temporary error) from command: /usr/bin/maildrop

For better diagnosis, add the log_defer_output and log_fail_output options
to the corresponding pipe transport, e.g.:

May 27 2009

Replication: Skip database on the slave

Put this in the configuration of the slave:


replicate_wild_ignore_table=mysql.%

Mar 13 2009

Deleting from table where record is missing in other table


delete from product_categories where category IN (select distinct category from product_categories PC LEFT JOIN categories C on PC.category = C.code WHERE code is NULL);

MySQL example:

delete PC from product_categories PC left join products P on PC.sku = P.sku where P.sku is NULL;
delete C from categories C left join product_categories PC on C.code = PC.category where C.parent > 0 and PC.category is NULL;

MySQL example for multiple table update: