November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

LVM2: device filter and LVM metadata restore

LVM2: device filter and LVM metadata restore Customize LVM device filter to get rid of the annoying “/dev/cdrom: open failed” warning

##/dev/cdrom: open failed warning $pvcreate /dev/sdb1 /dev/cdrom: open failed: Read-only file system $ vgcreate vg01 /dev/sdb1 /dev/cdrom: open failed: Read-only file system ##The error because LVM scan all device files by default, you can […]

Fix ShellShock Bash Vulnerability

With the announcement of the ShellShock Bash vulnerability last week it has caught news around the security updates. This is bug is being dubbed to be bigger than The Heartbleed Bug. Some interesting read about ShellShock can be found here.

Fix ShellShock Bash Vulnerability on CentOS – Test

Before you begin it’s better to test […]

Solved mount: special device /dev/VolGroup00/LogVol00 does not exist

Solved mount: special device /dev/VolGroup00/LogVol00 does not exist

There are times when using LVM you might come accross the error while mounting an LVM partition. The error that we are discussing here is mount: special device /dev/VolGroup00/LogVol00 does not exist.

[root@rmohan ~]# mount /dev/VolGroup00/LogVol00 /media/data

Output:

mount: special device /dev/VolGroup00/LogVol00 does not exist

Maybe in […]

DoS and DDoS attacks

Short definition : In computing, a denial-of-service attack (DoS attack) or distributed denial-of-service attack (DDoS attack) is an attempt to make a machine or network resource unavailable to its intended users. Odli?an link.

How to detect them # netstat -ntu | awk ‘{print $5}’ |awk -F: ‘{print $(NF-1)}’| sort | uniq -c | sort -n|grep […]

GPG on Linux

GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. GnuPG is compliant with RFC 4880, which is the current IETF standards track specification of OpenPGP. Current versions of PGP (and Veridis’ Filecrypt) are interoperable with GnuPG and other OpenPGP-compliant systems.

Solution 1 – Encrypt with a […]

Disable IPv6 lookups with Bind on RHEL or CentOS

Discovered during a recent project. Bind / Named was constantly spamming the logs about it being unable to reach root servers. The logs revealed that we were talking IPv6 addresses. Which was assumed to be disabled.

The less cool part was that in “/etc/named.conf” the following was commented out.

// listen-on-v6 port 53 { ::1; […]

Setting up sSMTP with GMail

Let me introduce you to the “extremely simple MTA to get mail off the system to a mailhub”. Particularly useful when you don’t want systems to have a full blown MTA installed. Such as Postfix, Exim or Sendmail. I find ssmtp extremely helpful on standalone servers that use Logwatch.

Getting this up and running requires […]

Changing the default PostgreSQL data folder (PGDATA)

Installing the PostgreSQL server on RHEL, CentOS, Scientific Linux or Fedora installs the PostgreSQL databases and configuration files in “/var/lib/pgsql/data”.

This may or may not be desirable. Let’s assume for a moment you have a separately crafted partition for PostgreSQL to use, let’s say a RAID10 volume. You’d want to change this.

Change the defaults […]

Resetting the root/postgres password for PostgreSQL

The following is required to reset the root/postgres user password for PostgreSQL. The distribution used in my example is CentOS 5.5 and PostgreSQL 8.4.

Note: By default there’s no password for the postgres user.

In step 2 and 5 you will most likely not be using “ident” but rather “password” or “md5?.

1. Shut down […]

View information about your BIOS from Linux using dmidecode

To get at this information we will use a utility called “dmidecode”. dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format.

On CentOS/RHEL/Fedora you may run the following to install it.

# yum install dmidecode

On Arch Linux you may run

# pacman -S dmidecode

The […]