Centos/RH 7 Reset Root Password

Further to the previous article regarding “Single User Mode” it’s worth noting that depending on your system you may require the root password to do even this. So if you’ve really, REALLY lost the root password then RedHat have these handy dandy instructions just for you! 🙂

Centos 7 “Single-User” Mode

Yup, for when you’ve forgotten the root password! Rather than copy/paste the details I’ll just link to a couple of reference sources. (Cheers Darren!) Boot in single user mode on CentOS 7 / RHEL 7 Single User Mode in CentOS 7 / RHEL 7

Postfix Rate Limiting

Following on from the excellent advice here: https://www.e-rave.nl/rate-limit-incoming-mail-on-postfix and here: http://steam.io/2013/04/01/postfix-rate-limiting/ You may want to add the following: smtpd_client_event_limit_exceptions = Without it postfix defaults to smtpd_client_event_limit_exceptions = $mynetworks and won’t apply rate rules to hosts within those networks. So if your problem is internal servers hammering your relay then the limits won’t get applied. Oh, … [Read more…]

OVH vRack With Public IPs and Citrix XenServer

If you install XenServer on a dedicated server from www.ovh.ie it comes with two NICs defined. NIC1 is the “normal” bridge network that has the server public/management IP address. IF you want to add “normal” IPs that you’ve purchased then the normal OVH guides are very good. However, it’s not particularly clear how to add … [Read more…]

MySQL Backup 1.2 (MySQL 5.5+)

In the previous versions of this script you’ve had to leave the backup user password in the script, however MySQL 5.5 and above come with mysql_config_editor which allows you to store connection details in an ancryptedl file (~/.mylogin.cnf) which mysql/mysqldump/mysqladmin can use with the “–login-path=” option. For basic usage run the following, the –password prompts … [Read more…]

Forcing a specific video mode, Centos 7

At the grub prompt, edit the line for the specific kernel and at the end of the line add: video=800×600-24 for 800 x 600 resolution with 24 bit colour. To make this permanent: Edit /etc/default/grub and add the video= to the end of GRUB_CMDLINE_LINUX line. # grub2-mkconfig -o /boot/grub2/grub.cfg This will force the video mode … [Read more…]

MySQL Backup 1.1

This is an update to the earlier MySQL backup script, with this version I’ve added the code that (assuming your backup user has sufficient rights) allows the script to get a list of all the databases on the server, exclude the MySQL internal ones and use this as the list of databases to backup. This … [Read more…]

Blocking By Country

There are times when you’ll want to limit access and block whole countries. Why? Because there are times when it’s necessary. Here’s a script that builds a script…. It downloads the IP ranges from www.ipdeny.com, works through a list of two letter country codes to create a bash script that will: Delete an existing iptables … [Read more…]