Software
Move old files to another directory with find
Submitted by racke on Tue, 08/31/2010 - 08:05.This example shows how to move a large number of files to another directory:
find /var/www/userpics -name '*.jpg' -mtime +31 -print0 | xargs --null mv --target-directory=/backup/oldpics/
Update with records from another table
Submitted by racke on Thu, 07/01/2010 - 10:55.
update subject_cloud set count = count + 1 from (select subject from subjects where sku = '9780520241329') as subs where subs.subject = subject_cloud.subject;
Testing Gzip compression on your website with wget
Submitted by racke on Sun, 05/23/2010 - 13:49.wget --save-headers --header\="Accept-Encoding: gzip,deflate" http://www.linuxia.de
Samba/OpenLDAP Cheatsheet
Submitted by racke on Thu, 12/03/2009 - 10:35.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.
OpenLDAP: TLS init def ctx failed: -207
Submitted by racke on Thu, 12/03/2009 - 10:21.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.
Open LDAP with SSL on Debian
Submitted by racke on Fri, 11/06/2009 - 10:40.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.
Pure-FTPd 1.0.23 has been released
Submitted by racke on Fri, 10/23/2009 - 15:06.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
OpenERP for starters
Submitted by racke on Tue, 07/14/2009 - 11:01.First of all I installed OpenERP on a local machine:
- Install OpenERP server
- PostgreSQL user
- Install OpenERP client
The installation is documented at doc.openerp.com.
The server is installed as follows:
- install required packages
- download and unpack sources
sudo python setup.py install
The installation neither adds an init script nor a configuration file.
Using TLS with Exim on Debian
Submitted by racke on Fri, 07/03/2009 - 09:04.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
Error Diagnosis on Pipe Transports
Submitted by racke on Tue, 06/09/2009 - 13:43.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.:
