Adding Greylisting To A FreeBSD Postfix Mail Server

Greylisting is an important tool in the war against spam, servers who connect to a mail server with  an active greylisting are given a 450 recipent address rejected error the first time they try to connect and will not be allowed to successfully connect for a predefined time frame (normally a couple of minutes). A 450 SMTP error is not a permanent error and an RFC compliant mail server will try and resend the email again a bit later on.

Read More

Locking A Linux Users Login

Sometimes you need to lock a user out of a system on a temporary basis, maybe they didn’t pay that last bill you sent? Luckily this can be done really easily with the passwd command.

i.e passwd -l username

This adds a ! character to the start of the users encrypted password making it invalid. When you want to unlock the account the process is easily reversed using the passwd again but this time with the -u prefix.

i.e passwd -u username

Read More

Lost MySQL Root Password

It happens everynow and again, you login to a server to do something with MySQL only to find the root password is nowhere to to be found.

Never fear its not too hard to reset and you should be back up running again in a couple of minutes.

Step 1

First stop the database server with killall mysqld or /etc/init.d/mysqld stop

Step 2

Execute the command mysqld –skip-grant-tables –user=root to get the MySQL server running again minus the need for a password.

Step 3

Read More