Category Archives: Open Source

ldap_add: Invalid syntax (21) – fix

This error was driving me nuts:

ldap_add: Invalid syntax (21)
    additional info: objectClass: value #0 invalid per syntax

despite looking at my ldif a hundred times, until I relized my perl script added white space at the end of the line ….

        print "objectClass: top\n";
    print "objectClass: person \n";
    print "objectClass: organizationalPerson \n";
    print "objectClass: inetOrgPerson \n";
    print "objectClass: mozillaOrgPerson \n";
    print "objectClass: evolutionPerson \n";
    print "objectClass: simpleSecurityObject \n";

once changed to :

       print "objectClass: top\n";
    print "objectClass: person\n";
    print "objectClass: organizationalPerson\n";
    print "objectClass: inetOrgPerson\n";
    print "objectClass: mozillaOrgPerson\n";
    print "objectClass: evolutionPerson\n";
    print "objectClass: simpleSecurityObject\n";

The ldap gods were smiling again, hope this saves someone some time.

CentOS 5 – add dag repo

rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

ubuntu – openvpn client does not update resolve.conf

install resolvconf :

sudo apt-get install resolvconf

add to your openvpn client config :

up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Linux HA – CRM commands

Small reminder as I always tend to forget these :

Dump the CRM cib db :

cibadmin -Q > cib.backup.xml

Modify a resource , dump the cib, modify the xml for the resources and then import using cibadmin -M

cibadmin -V -M -o resources -x modified_resources.xml

Add a resource , create the xml for the resource and them use -C

cibadmin -V -C -o resources -x new_resource.xml

Move resource from one location to another, -f to force it …

crm_resource -M -r resource -H host
crm_resource -M -r resource -H host -f

swaks – mail server testing tool

If you dont like using telnet to test a remote or local smtp server , swaks is a neat little tool to do the job for you.
its also available ( suprise suprise … ) in the freebsd ports : /usr/ports/mail/swaks.

found it first here