support@yourtech.us | Webmail |  DNS Login | *Billing* | cPanel | (814) 652-5358

Welcome to YourTech, LLC. If you are unfamiliar with this site, you may want to find out about my services, read my story, or you could simply be looking for a way to contact me. On this site, you will find a collection of technical musings, howto guides, and technical reference information.

September 2008 Archives

Fixing the RPM Database

submit to reddit | No Comments | No TrackBacks
Occasionally, the RPM database on a system will become corrupt and need rebuilding.


If you get errors like this:

error: rpmdbNextIterator: skipping h#     834 Header V3 DSA signature: BAD, key ID db42a60e
error: rpmdbNextIterator: skipping h# 842 Header V3 DSA signature: BAD, key ID db42a60e
error: rpmdbNextIterator: skipping h# 850 Header V3 DSA signature: BAD, key ID db42a60e

The issue is caused by a bad GPG Key. Also note that this is a full-fledged way to rebuild the rpm database and the PubKeys.

cd /var/lib/rpm
rm __db.00[123]
mv Pubkeys Pubkeys.bad
wget http://www.redhat.com/security/db42a60e.txt
rpm --import db42a60e.txt
rpm --rebuilddb

Enable SSH on VMWARE ESXi

submit to reddit | No Comments | No TrackBacks

To enable SSH on VMWare ESXi, do the following:

  1. At the console, press Alt + F1
  2. Type "unsupported" and press enter (Note, you will be doing this blindly)
  3. You will be prompted for the root password, enter it.
  4. vi /etc/inetd.conf
  5. Go to the line for ssh (try "/ssh" to find it)
  6. Uncomment the ssh line (if the cursor is over the #, hit "x")
  7. Save the file ("wq!")
  8. Restart the services ("/sbin/services.sh restart")

You should now be able to ssh in as root to the server.

There is a chance that you will have to restart inetd in order for this to work:

# get the PID of inetd
ps a | grep inetd
kill -HUP inetdpid

Make a drive image in Linux

submit to reddit | No Comments | No TrackBacks


The following instructions will show you how to create either a growable (consumes space as needed) or reserved (consumes all space in the beginning) drive image file, format it, and mount it as a directory. This usable on systems that are already partitioned and you need to work with a new "partition" (say one with/without quota support), or just want a portable filesystem that you can transfer between systems.

Create a "growable" 80GB disk image called virt.img.

dd if=/dev/zero of=virt.img  bs=1M seek=81920 count=1

(note that 81920 = 80 * 1024)

or create a "reserved" 80GB disk image called virt.img

dd if=/dev/zero of=virt.img  bs=1M count=81920 seek=1

(note that 81920 = 80 * 1024)

Format your virtual partition (choose yes to continue):

/sbin/mkfs.ext3 virt.img

Mount the virtual partition:

mkdir /mnt/image
mount -o loop virt.img /mnt/image

The /etc/fstab entry (assuming virt.img is stored in the root partition "/" ):

/virt.img        /mnt/image         ext3    rw,loop,auto    0 0

Sendmail Outbound IP

submit to reddit | No Comments | No TrackBacks


If you have a server with multiple ip addresses, sendmail will default to sending email out using the first ip address.

If you want to explicitly use a different IP address, you can configure it in /etc/mail/sendmail.mc

Add the line CLIENT_OPTIONS:

CLIENT_OPTIONS(`Family=inet,Adress=1.2.3.4')dnl