How to regenerate the /etc/udev/rules.d/70-persistent-net.rules file on Debian/Ubuntu

For quite a few years now most linux distributions ship udev with a network interface name caching mechanism. This simply means that whenever udev assigns a name for a network interface, it's cached (based on the interface's MAC address) in /etc/udev/rules.d/70-persistent-net.rules. However if you're cloning a system, the copy still contains this cache file. And since it lists your common interface names (from the original/source system) like eth0 or eth1 as occupied by specific MAC addresses, the cloned system will get new interface names (eg. eth2, eth3, rename3, etc.). Obviously this will break everything that references the old names and most of the time this will result in no network in the cloned system.

How to install Oracle Java (JRE/JDK) on Debian (Squeeze)

Works like a charm, even on Debian Squeeze. You just have to add the Sid repository and specify a low priority in your APT configuration via a new /etc/apt/preferences.d/debian-sid file, like this one ...

How to install Exim4 on a local (LAN) host to use an SMTP smarthost for sending mail

First of all: install exim Smile
apt-get install exim4 bsd-mailx
Now we have to reconfigure it, because by default it won't deliver any mails to any external address:
dpkg-reconfigure exim4-config

How to test recursively various archive files

The following simple command will browse through the tree of the current directory for various archive files and test their integrity. If the test fails, it'll print the file's path. You can easily extend it by adding more filename patterns and tests.
find . -type f \( \( -iname '*.zip' -o -iname '*.jar' -o -iname '*.war' -o -iname '*.ear' -o -iname '*.odt' -o -iname '*.ods' -o -iname '*.odp' -o -iname '*.docx' -o -iname '*.xlsx' -o -iname '*.pptx' -o -iname '*.xpi' \) -not -exec sh -c "unzip -t -P '' '{}' > /dev/null 2>&1" \; -o \( -iname '*.tar.gz' -o -iname '*.tgz' \) -not -exec sh -c "tar tzf '{}' > /dev/null 2>&1" \; -o -iname '*.tar.bz2' -not -exec sh -c "tar tjf '{}' > /dev/null 2>&1" \; -o -iname '*.tar' -not -exec sh -c "tar tf '{}' > /dev/null 2>&1" \; -o -iname '*.rar' -not -exec sh -c "unrar t -p- '{}' > /dev/null 2>&1" \; \) -print

Managing SSL certificates for various JVMs on Debian Squeeze

In case of the Sun/Oracle JVM (JRE/JDK) the SSL certificates are store in this keystore: /etc/java-6-sun/security/cacerts. To update it, use the keytool utility that comes with the JRE/JDK.

How to configure SSL (aka. ldaps) for libnss-ldap/auth-client-config in Ubuntu

The LDAPClientAuthentication page in the Ubuntu Community wiki describes the basic setup pretty well. However if you bring encryption (SSL/TLS) into the game, it's a quite different story.

Munin plugin to monitor DNS response times

With this Munin plugin you can monitor the DNS response times of specific queries. It uses dig to execute the DNS queries. You can specify multiple hostnames to query for and a separate DNS server for each query. Quite useful. I've added the hostnames (that you query for) to the labels in the generated Munin reports in the attached (modified) version of the plugin.

How to install Oracle Database Express Edition 11g Release 2 (11.2) on Debian Squeeze x86_64

There's a very good howto on installing this particular Oracle RDBMS version on Ubuntu 11.10 here. However Ubuntu is not Debian, there're a few differences. Mostly you've to skip a few steps:

How to log (eg. iptables) messages based on message body in a separate file using rsyslogd

In Debian the default /etc/rsyslog.conf includes all *.conf files from /etc/rsyslog.d. The contents of these config files are read by rsyslogd before the default rules, so you easily override any defaults.

Network connection problems in Debian Squeeze after the net.ipv6.bindv6only change

Well, this is a classic one. Smile The maintainer of the netbase package proposed a fundamental change in how network sockets should be managed regarding IPv4 vs. IPv6 (ie. IPv4-mapped IPv6 addresses). He suggested that the default of the net.ipv6.bindv6only kernel variable should be set to 1 (whereas the current default is 0). After "some" discussion (he and two other guys had something to say about the topic in a one and a half month period) he made the change on 6th December 2009.

Syndicate content