James Stephens

March 21, 2006

Backup/Restore Scripts For Imaging/Cloning Disks Using Partimage Under Linux

Filed under: Unix Scripts — James Stephens @ 9:57 am

In a recent post some advantages were discussed in using Partimage over g4u and Symantec Ghost. Following on from that, example scripts and a simple methodology are provided below to backup and restore Linux partitions using partimage run from a client system, to a remote server running partimaged.
(more…)

March 17, 2006

Scripting Partition Creation In Linux Using Fdisk

Filed under: Unix Scripts — James Stephens @ 8:19 pm

This post details a way to script partition creation under Linux using fdisk. I was originally trying to use sfdisk to perform this task as it is designed to be scriptable, reading lines of the form

     

where each line fills one partition descripton. The problem for me was that sfdisk only appears to accept partition sizes defined in cylinders; for partitioning similar sized disks with different geometries this is inconvenient.
(more…)

February 15, 2006

How To Perform In-Place Editing Of A File Using Perl

Filed under: Linux, Unix Scripts — James Stephens @ 8:04 am

This post describes how to perform in-place editing of a file using Perl.
(more…)

January 31, 2006

Configuring Vacation Mail With Procmail

Filed under: Unix Scripts — James Stephens @ 2:44 pm

If you use procmail to filter messages, setup vacation email response via your /home/USER/.procmailrc rather than the vacation program.
(more…)

January 30, 2006

An Interactive Unix Vacation Mail Script

Filed under: Unix Scripts — James Stephens @ 4:47 pm

An interactive script is provided to generate a vacation message under Unix.
(more…)

Fixing A Line Wrap Problem When Printing Using CUPS

Filed under: Unix Scripts — James Stephens @ 4:29 pm

A script is provided to fix lines not wrapping properly when printing text files from the Common Unix Print System (CUPS).
(more…)

Verifying All The RPM Packages Installed On A System

Filed under: Unix Scripts — James Stephens @ 11:14 am

A bash script is provided to verify all the RPM packages installed on a system.
(more…)

Opening A Shell Session In A Window On A Remote Host

Filed under: Unix Scripts — James Stephens @ 10:52 am

Here is a simple bash script for opening a shell session in an xterm window on a remote host.
(more…)

January 16, 2006

Securely Copying A File To Multiple Machines With Secure Copy (SCP)

Filed under: Unix Scripts — James Stephens @ 2:20 pm

A bash script is provided for copying a file to multiple machines via Secure Copy (SCP).
(more…)

Secure Remote Administration With Secure Shell (SSH)

Filed under: Unix Scripts — James Stephens @ 2:13 pm

A bash script is provided for executing a shell command on multiple hosts via Secure Shell (SSH):
(more…)

January 12, 2006

Iptables - Example Firewall Rulesets

Filed under: Iptables, Unix Scripts, Unix Security — James Stephens @ 10:46 am

Two example iptables firewall rulesets are provided. Both are designed for a single-homed host and utilize the stateful inspection feature of iptables for all connections.
(more…)

Powered by WordPress