Drop all tables in a MySQL database

No Comments

mysqldump -u[USERNAME] -p[PASSWORD] –add-drop-table –no-data [DATABASE] | grep ^DROP

| mysql -u[USERNAME] -p[PASSWORD] [DATABASE]

[USERNAME][PASSWORD] & [DATABASE] are all the details for your database.

Enlarge a xen Image (.img) File

No Comments

This HOWTO will allow you to increase the size of .img files created with dd. Note that this process changes the on-disk image in place and hence it is highly recommended that you back up the image first. Also, make sure the image is not already mounted or backing a live domain or virtual machine! This process is *not* recommended for decreasing the overall size of an image and would likely cause the image itself to be corrupted if attempted.
Replace image_file and size_in_MB appropriately
# dd if=/dev/zero of=image_file bs=1M conv=notrunc count=1 seek=size_in_MB
# losetup /dev/loop0 image_file
# e2fsck -f /dev/loop0
# resize2fs /dev/loop0
# e2fsck -f /dev/loop0
# losetup -d /dev/loop0

smbd unable to connect to cups server

No Comments

I have printing disabled (load printers = no, commented the printer share) in Samba but still puts lots of lines like this in the syslog:

May 29 16:31:02 home smbd[9505]: [2011/05/29 16:31:02, 0] printing/print_cups.c:cups_connect(69)
May 29 16:31:02 home smbd[9505]: Unable to connect to CUPS server localhost:631 - Connection refused

After trying many things, this worked for me:

load printers = no #(this alone isn't enough)
show add printer wizard = no
printing = none
printcap name = /dev/null
disable spoolss = yes

Older Entries