Enable ssh root login on Cobalt RAQs

To enable root logins via SSH on a Cobalt RAQ, edit /etc/ssh/sshd_config and change “PermitRootLogin” to “yes”.

I needed to do this to allow Plesk to login to our old servers during the big migration, as it can’t login as admin, then su to root 🙁

SpamAssassin: Can’t locate Mail/SPF/Query.pm

If you have SpamAssassin installed and see “Can't locate Mail/SPF/Query.pm in @INC...” in your error logs, you need to install Mail::SPF::Query.

SpamAssassin uses SPF to detect header and email-source forgery – very important in determining if e-mail is legitimate or not.

To install Mail::SPF::Query, run these commands as root:

perl -MCPAN -e shell
install Mail::SPF::Query

If you haven’t yet added SPF records to your DNS, you can find out more at the Sender Policy Framework site

SpamAssassin: Can’t locate Mail/SPF/Query.pm

If you have SpamAssassin installed and see “Can't locate Mail/SPF/Query.pm in @INC...” in your error logs, you need to install Mail::SPF::Query.

SpamAssassin uses SPF to detect header and email-source forgery – very important in determining if e-mail is legitimate or not.

To install Mail::SPF::Query, run these commands as root:

perl -MCPAN -e shell
install Mail::SPF::Query

If you haven’t yet added SPF records to your DNS, you can find out more at the Sender Policy Framework site

GPG: There is no assurance this key belongs to the named user

In GnuPG, if you get an error saying “There is no assurance this key belongs to the named user” when trying to encrypt, you need to sign the public key.

You can sign the key by typing “gpg --sign-key user-id” at the command prompt.

Footnote: I came across this whilst migrating our e-commerce system to a new server. The system uses GnuPG to encrypt the order/credit card information and then emails it to our sales team. I’m making sure I document the process fully, so that I don’t have to spend so much time figuring this stuff out again! 🙂

Change default language in bash

To change the default language in the bash console (shell, terminal, command line – whatever you want to call it), go to your user home (e.g. /home/username/) edit or make a .bash_profile, and add this line to it:

export LANG=en

For some bizarre reason, our new dedicated server from 1and1 defaults to German feedback, which is really handy when you’re trying to work on the shell!

Update – 2007-02-27: If you have a 1and1 server stuck in German, this solution above doesn’t work properly (it breaks some stuff). I’ve written up a much more elegant solution which does actually work (thanks to Scott from ART).