rm -r für 1001 Nacht

Es war einmal ein Sysadmin, der hatte schon 1000 mal als root den Befehl “rm -r” ausgeführt. Das war gefährlich aber manchmal unabdingbar. Beim 1001ten mal dachte er – nach einem ‘ls /mnt/vz2’ – er sei bereits im Verzeichnis vz2. Aber er war ein Verzeichnis höher. Als er plötzlich die Fehlermeldung sah, “cannot delete /proc/23422… […]

Add/duplicate mailman list

pre:/usr/lib/mailman/bin# newlist Enter the name of the list: vmk11 Enter the email of the person running the list: root@vmk.zhdk.ch Initial vmk11 password: To finish creating your mailing list, you must edit your /etc/aliases (or equivalent) file by adding the following lines, and possibly running the `newaliases’ program: ## vmk11 mailing list vmk11: “|/var/lib/mailman/mail/mailman post vmk11” […]

Issue while vzmigrate

OPT:–online OPT:195.176.254.192 StartingOpenVZ is running… 2042.conf 100% 1190 1.2KB/s 00:00 Saved parameters for CT 2042 2042.mount 100% 109 0.1KB/s 00:00 SyncingLive Setting up checkpoint… suspend… get context… Checkpointing completed succesfully Setting up checkpoint… join context.. dump… Can not dump VE: Device or resource busy Error: splice is used by 7867,18126(nscd) Checkpointing failed Error: Resuming… files2010:/mnt/vz4# […]

Migrate Webserver

Freshly setup a new VE and copy over config/data files from older one. A field tested example: 1. Setup new VE (1100) 2. On new VE: apt-get install php5-mysql php5-gd php5-imagick optional: cronolog imagemagick locate less 3. check for conflicting GID/UIDs: diff /mnt/vz1/private/1100/etc/group /mnt/vz3/private/1003/etc/group diff /mnt/vz1/private/1100/etc/passwd /mnt/vz3/private/1003/etc/passwd 4. If no conflicts: root@vz2011:/mnt# cp /mnt/vz3/private/1003/etc/group /mnt/vz1/private/1100/etc/ […]

debian-archive-keyring

Q: W: GPG error: http://mirror.switch.ch squeeze Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9 W: GPG error: http://security.debian.org squeeze/updates Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA W: GPG error: http://mirror.switch.ch squeeze-updates Release: The following signatures couldn’t […]