Yearly Archives: 2009


LDAP from command line

Using LDAP from command line can be quite man (or info) expensive. Usually LDAP is used for samba authentication, so it is set up something like this: domain example.com is described in LDAP as base dn: "dc=example,dc=com" also two OU-s are usually present: ou=groups for all groups and ou=users for all users. All this is case insensitive. Selecting all groups from LDAP is done using ldapsearch. ldapsearch -x -b "ou=groups,dc=example,dc=com" -h LDAP_host This lists all groups.

Multiple internet connections in one box

Sometimes it is needed to have multiple internet connections in one Linux box. To distinguish it from a more common scenario - it means that multiple default routes are specified. Multiple default routes is a bit of a dilemma - default route is loosely defined as 'if everything else fails send packets there'. By definition there can not be two or more last resort options. One of those internet connections therefore should be designed as default, and configured normally, giving it IP address, default gateway and so on. The rest should have its IP addresses configured.

Amavisd-new – release items from MySQL quarantine

A crude way to release e-mails from amavisd-new quarantine.
As amavisd-release works well for file based quarantines, but sometimes just a plain telnet is all You’ve got.
First find email id from logs. Something like ChRQj9iij3-V is probably ok. Then more data can be found from MySQL, where msgs is a table in standard amavisd-new MySQL schema.… Read the rest