Archive for April 2010

where to locate purchased music on an iPod Touch / iPhone

it’s in /var/mobile/Media/Purchases/

ActiveDirectory and the global catalog

At work, we’re running a 2008R2 AD forest containing 5 sub-domains. now to query the LDAP can be a pity if you don’t know in which one of the overall 6 domains the queried object is located.

After months of helplessness and various (unsuccessful) experiments with meta-directories, ldap-proxies etc. we discovered that the problem is already solved. the solution is to use a different port, ActiveDirectory provides the so-called “global catalog” (containing all the information from the whole forest) on port 3268.

Assume, your username is “un321” and your account is located in the “it” subdomain of the “ads.forest.private” domain. To query for a user called “ab123” use the following ldapsearch-command:

ldapsearch -x -b "dc=ads,dc=forest,dc=private" -D 'un321@it.ads.forest.private' \\
        -h ads.forest.private -p 3268 -W  "(userPrincipalName=ab123*)"

10.04 countdown

restoring a MySQL dump on a freshly installed debian/ubuntu system

to restore a dump from a MySQL database created on a debianish Linux system, just feed the dumped SQL to the command-line mysql client like this:

mysql -u root -p < mysql-all-2010-03-28-0515.sql

since the whole content of all MySQL databases are overwritten with that stored in the dump, credentials are affected as well. that’s the reason why debian’s system tools won’t work any more after restoring the old dump, since debian creates a maintenance-user called “debian-sys-maint” during the installation and stores the randomly generated credentials in “/etc/mysql/debian.cnf” so it’s sufficient to just copy the “password” values from the old file into the new one and restart mysql. otherwise, you will run into an error like this:

/etc/mysql/debian-start[3181]: Running 'mysqlcheck'...
/etc/mysql/debian-start[3181]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) when trying to connect
/etc/mysql/debian-start[3181]: FATAL ERROR: Upgrade failed

my mdadm notes…

examine the superblock of a device:

mdadm --examine /dev/sdd1

re-assemble an array when autodetection fails:

mdadm /dev/md0 --assemble --force /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/dm-6

hotplugging SATA harddisks in Linux

That’s just a few records on my personal experience regarding the hot-swapping/hot-plugging capabilities of SATAContinue reading ‘hotplugging SATA harddisks in Linux’ »

building “gpsturbo” on ubuntu/karmic

gpsturbo“ seems to be a potential open-source rival for GSAK that a friend of us suggested (he knows the author in person), so I decided to give it a try. Currently, no Linux-binaries are available, so here are my notes what is required to build it on Ubuntu from scratch:

sudo aptitude install subversion libasound2-dev libcups2-dev libfreetype6-dev

Compilation has been done in a clean karmic chroot, which already contained my default package selection for compilation-chroots:

apt-get install wget devscripts gnupg aptitude sudo vim bash-completion libxext-dev