Author Archive

MySQL set Fulltext Min_Word_Len

add the following to my.cnf under [mysqld] ft_min_word_len=2 stop mysql myisamchk –recover –ft_min_word_len=2 /var/lib/mysql/*/*.MYI start mysql

MySQL Dump database to Email

To backup a database and send it to email, add a cron job like: mysqldump -ce –user=user –password=pass dbname | gzip |uuencode dbbackup.gz| mail -s “xxxx Database Backup” me@mydomain.com

MSSQL Express Scheduled Backups

The Express edition of SQL server lacks automated scheduled backup functionality.  The following script will back up your databases.  It retains them for 7 days but can be easily edited: Create a directory called c:\SQLBackup and go into it Create a backup.sql file: DECLARE @name VARCHAR(50) — database name DECLARE @path VARCHAR(256) — path for […]

Mailman reset password

Reset a mailing list password in Mailman: /usr/lib/mailman/bin/change_pw -d mydomain.com -ptemppass

Linux reset root password

A Linux servers root password can be reset in a few simple steps via single-user mode. To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following: 1. At the boot loader menu, use the arrow keys to highlight the installation […]

Linux / nix Error Codes

Not comprehensive, but comes in handy: *  EPERM 1 /* Operation not permitted */ (Linux) *  EPERM 1 /* Not owner */ (SCO Unix) *  ENOENT 2 /* No such file or directory */ *  ESRCH 3 /* No such process */ *  EINTR 4 /* Interrupted system call */ *  EIO 5 /* I/O […]

IPTables Examples

As it is a table of rules, the first rule has precedence. If the first rule dis-allows everything then nothing else afterwards will matter. * INIVIDUAL REJECTS FIRST * THEN OPEN IT UP * THEN BLOCK ALL List iptable rules: iptables -n -L (-n prevents slow reverse DNS lookup) Add rule to Reject all from […]

Identifying Rogue Processes in IIS

Bring up a command prompt and execute: iisapp.vbs This gives you a mapping of process id to application pool.  Next bring up the task manager and identify the process that you are interested in.  If process ids are not currently shown, go to the view menu, select Choose Columns and tick PID. You should now […]

Test HTTP with Telnet

# Telnet to server on port 80 GET /index.html HTTP/1.0 Host: www.test.com For HTTPS you will need to use openssl: openssl s_client -connect localhost:443 GET /index.html HTTP/1.0 openssl s_client -connect localhost:443

Horde Plesk enforce signature

To enforce a signature/footer on all users: Edit /usr/share/psa-horde/imp/config/trailer.txt