Citizens guide to the 21st century
scratch book of what you should know to be a citizen of the 21st century

wget -r -l 2 -p -k -erobots=off   www.website.de/page -r : recursive -l 2: max depth 2 -p: download site prerequisites (background images etc.) -k: convert links for local reading -erobots=0: ignore robots.txt

./withlist -l -r fix_url list_name –urlhost=host2.domain.com

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” […]

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/ […]

apt-get install dnsmasq nfs-common nfs-kernel-server /etc/dnsmasq.conf interface=eth1 dhcp-range=195.176.254.201,195.176.254.210,12h enable-tftp tftp-root=/tftpboot dhcp-boot=pxelinux.0 /etc/exports /livecd 195.176.254.0/255.255.255.0(async,no_root_squash,no_subtree_check,ro) /liveiso1 195.176.254.0/255.255.255.0(async,no_root_squash,no_subtree_check,ro) mount images command: mount -o loop /mnt/vz2/images/ubuntu-10.10-desktop-i386.iso /livecd mount -o loop /mnt/vz2/images/clonezilla-live-1.2.8-46-i686.iso /liveiso1 files2010:/tftpboot# ls -ltr total 12212 drwxr-xr-x 2 root root 4096 2011-09-09 15:43 casper drwxr-xr-x 2 root root 4096 2011-09-09 15:43 boot drwxr-xr-x 3 root root 4096 […]

#!/bin/sh export sshchk=`ps auxwww |grep remo@groupware|wc -l` if [ $sshchk -gt 1 ] then exit else export mac=`/sbin/ifconfig | grep eth | awk {‘print $5’}` wget –no-check-certificate x.y.ch/getid.php?mac=$mac -O /tmp/id export remo_id=`cat /tmp/id` ssh remo@groupware.vmk.zhdk.ch -i /home/c1audio/.ssh/id_rsa -o ExitOnForwardFailure=yes -NR $remo_id:localhost:22 & fi # m h dom mon dow command * * * * * […]

Categories: networking | Add a Comment

Anstelle von Passwörtern verwenden wir asymmetrische Schlüsselpaare. Das sind in der Praxis zwei Dateien, wovon die eine öffentlich ist und die andere auf keinen Fall weitergegeben werden darf. Folgenden Befehl eingeben und 3 mal mit enter bestätigen: sq131-2-4-vmk-itzs14895:~ itz$ ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair. Enter file in which to save […]

ssh root@host1.ch >>superlog tail -f /var/log/auth.log ssh root@host2.ch >>superlog tail -f /var/log/auth.log ssh root@host3.ch >>superlog tail -f /var/log/auth.log seems to work quite decent, no mixed up lines until now…

Categories: audio, networking | Add a Comment

mplayer -ao jack live.vmk.zhdk.ch/VMK_Radio

wget -m -k -K -E www.website.ch/

Bei blumen-verlag.ch sind keine Mails angekommen, weil der MX-Eintrag im DNS-Server nicht korrekt war. Habe diesen korrigiert: vorher: IN MX 10  smtp.zhdk.ch. nachher: blumen-verlag.ch.  IN MX 10  smtp.zhdk.ch. Man kann dies wie folgt überprüfen: Vorher wird kein Eintrag fürs mail-handling angezeigt: vz2010:~# host blumen-verlag.ch blumen-verlag.ch has address 195.176.254.173 Nachher wird ein Eintrag fürs mail handling […]

Categories: networking | Add a Comment

apt-get install nagios-nrpe-server nagios-plugins sudo vi /etc/nagios/nrpe.cfg change line: allowed_hosts=127.0.0.1 to: allowed_hosts=<ip of your nagios server> /etc/init.d/nagios-nrpe-server restart scp phrenia.vmk.zhdk.ch:/usr/lib/nagios/plugins/check_3ware.pl /usr/lib/nagios/plugins/ scp phrenia.vmk.zhdk.ch:/usr/lib/nagios/plugins/nagios_vz_bean.py /usr/lib/nagios/plugins/ vi /etc/nagios/nrpe_local.cfg command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -u nrpe -p nrpe command[check_raid]=/usr/bin/sudo /usr/bin/perl /usr/lib/nagios/plugins/check_3ware.pl -d c0 command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 10M -c 50M -p /dev/sda1 command[check_vz]=/usr/bin/sudo /usr/bin/python /usr/lib/nagios/plugins/nagios_vz_bean.py visudo add line: nagios  […]