Remotely wipe a Linux based server

There may come a time when you need to remotely wipe a Linux based server. Maybe your server has been compromised, is no longer required in production or, for security reasons, you simply need to make sure that the server is fully erased and no longer recoverable.

Note: This process is specifically designed for headless servers, e.g. server which do not have a locally (or remotely – think KVM) screen, keyboard or mouse. There are other options available for locally accessible servers which a DBAN (or similar solution) can be ran on.

Step 1: SSH into the server then type:

# dd if=/dev/zero of=/dev/sdaX

To check the correct hard disk device to wipe use:

#df -h

The DD command will copy zeros over the whole disk, rendering any existing data useless.

Step 2: Wait approximately ~10 minutes (more for good (or worse?) measure) after which time run:

# echo 1 > /proc/sys/kernel/sysrq
# echo o > /proc/sysrq-trigger

These commands will initiate a full power off of the server.

For click here for more information on the sysrp command and here for information on the sysrp-trigger command.

Dell OpenManage Command Line

Dell’s OpenManage product consists of a number of network management and systems management applications which are made available via a secure, web-based dashboard. The dashboard is usually located a

A number of technical senarios such as restrictive firewall configurations or server level scripts may raise the need for Dell Open Manage (DOM) commands to be initiated from the command line. This short articles serves to outline some of the commands available and their use.

There are five main command line modules available for Dell OpenManage:

Command Used For Component Of
omreport Read hardware settings and state information OpenManage Server Administrator
omconfig Set hardware options like BIOS settings OpenManage Server Administrator
racadm Read or set configuration of the Dell Remote Access Card OpenManage Deployment Toolkit
syscfg Read or set BIOS options OpenManage Deployment Toolkit
raidcfg Read or set options for the RAID controller OpenManage Deployment Toolkit

Each of these commands can be initialized from the bash shell (Linux) or command line (Windows) in the same way any other system application can be ran.

An example is outlined below:

[root@server ~]# omreport chassis temps
Temperature Probes Information

Main System Chassis Temperatures: Ok

Index                     : 0
Status                    : Ok
Probe Name                : PROC Temp
Reading                   : 48.0 C
Minimum Warning Threshold : 10.0 C
Maximum Warning Threshold : 120.0 C
Minimum Failure Threshold : 5.0 C
Maximum Failure Threshold : 125.0 C

Other command line examples are available at: and instructions on install Dell OpenManage for Linux are available in my blog here.

Install VMware Tools on CentOS 6

To install VMware Tools on a CentOS 6.x virtual machine:

1. SSH to your VM or use the VMware ESXi Client to access the VM’s shell.

2. Run the following commands:

# yum -y install perl
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom
# cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp
# umount /mnt/cdrom
# tar -zxf /tmp/VMwareTools-*.tar.gz -C /tmp
# cd /
# ./tmp/vmware-tools-distrib/ --default
# rm -f /tmp/VMwareTools-*.tar.gz
# rm -rf /tmp/vmware-tools-distrib

3. Reboot your Virtual Machine

4. VMware tools is now installed.

Change your MAC address in BackTrack

When carrying out a network security audit it is important to change the MAC address (Media Access Control) of your auditing machine. Changing your MAC address will protect the identity of your machine on the network you are auditing as well as allow you to circumvent MAC filtering and restrictions in place.

Backtrack is my security distrobution of choice and provides an easy way to re-configure your MAC address on the fly:

1. Open Terminal
2. Type: #ifconfig eth0 down

Note: eth0 can be replaced with any other local interface

3. Change your MAC address using the macchanger application:

#macchanger --mac 00:11:22:33:44:55 eth0

Alternatively use:

#macchanger -r eth0

This will set a ‘random’ MAC address on your interface.

4. Re-enable your network interface by typing:

#ifconfig eth0 up

5. Confirm the MAC address is in place by using: #ifconfig eth0 | grep HWaddr

Enable Plesk Hard Disk Quotas

In order to monitor client disk space usage in Plesk, disk quota must be enabled. This is a two step process and the initial quota scan may take some time (~1 hour) and may cause notable load on your server so I recommend running this outside of your peak load times.

1. Add userquota to the FSTAB options:

Original FSTAB:

/dev/md0 / ext3 defaults 1 1

FSTAB with usrquota enabled:

/dev/md0 / ext3 defaults,usrquota 1 1

Lastly, remount your file system to enable quota support then run a quota scan:

# mount -o remount /
# quotaoff -av
# quotacheck -avum
# quotaon -av

More information regarding disk quota options can be found here.