Background: I made a tar backup of one system and wanted to untar that onto different hardware. A bit like cloning. However I needed to make sure the hostname and network settings were those of the new machine and not the cloned machine. So for future reference … Change the Hostname vi /etc/hosts Change the… Read more »
Posts By: jonny
Zero Filling a Disk in Linux
The simple way to wipe or zerofill a disk is: dd if=/dev/zero of=/dev/sd? bs=1M However I found an article describing how to zero-fill with a progress indicator using pipebench, installed on Debian/Ubuntu with: sudo apt-get install pipebench then use: tr ‘\000’ ‘\377’ < /dev/zero | pipebench | sudo dd of=/dev/sd? Substitute the question mark for… Read more »
Increasing CentOS LVM under VMWare

Background: I had an existing CentOS machine as a virtual machine running on VMWare ESX Server and it was running out of space so for future reference I did the following. Incidentally my disk is sda with the new partition create on the extra space as sda3. I first increased the disk using the vSphere… Read more »
GDL: Taking It Further
Quick Reference Good PDF introduction to the GDL language. Libraries Hunting around the web there are people producing extra libraries which can be downloaded : NASA IDL Astronomy Libraries SDSSIDL – a set of general IDL utilities for plotting, data analysis, and database access Daithi Stone IDL Libraries – Geographical, Arrays, Filesystem, Calendar, Graphics, I/O,… Read more »
GDL: Beginner Code Examples
The Gnu Data Language is an interactive interpreter/incremental compiler for the GNU Data Language, which is primarily used in scientific, astronomical, medical and geo-science data processing applications. It supports graphical output and is intentionally designed to be highly compatible with the commercial IDL language. GDL is a free IDL (Interactive Data Language) compatible incremental compiler… Read more »
Website Vulnerability Scanning
So I tested out Skipfish today to do a quick check on a website / web server. Hosted on Google at: http://code.google.com/p/skipfish/ download it, extract it and make and run: wget http://skipfish.googlecode.com/files/skipfish-2.01b.tgz tar xzf skipfish-2.01b.tgz cd skipfish* cp ./dictionaries/medium.wl . make ./skipfish -o ./myreport http://domain.co.uk/index.php Skipfish will create an HTML report in the ./myreport directory… Read more »
Get Image Dimensions on the COmmand Line
Occasionally useful to find out the dimensions of an image without having to load an image editor or file manager. From the ImageMagick toolkit: identify myimage.jpg tiffinfo myimage.tif pnginfo myimage.png
SquidGuard LDAP User Search and Special Characters
So I had a problem with the ldapusersearch string as some eejit has created an OU with spaces and an apostrophe in the name. So the characters are represented as: comma %2c space %20 apostrophe %27 For example (entirely fictional organisation): src staff { ldapusersearch ldap://dc.ads.domain.uk:3268/dc=ads,dc=domain,dc=uk?sAMAccountName?sub?(&(sAMAccountName=%s)(memberOf=cn=All%20Staff%2cOU=King%27s%20College%20Dublin%2cdc=ads%2cdc=domain%2cdc=uk)) }
Squid 3 Warning
WARNING: (B) ‘::/0’ is a subnetwork of (A) ‘::/0’ I had this warning when restarting squid 3. I had a line left over from squid 2: acl all src 0.0.0.0/0.0.0.0 which I had subsequently changed to acl all src all as I received a CIDR warning. So to get rid of the subnetwork warning I… Read more »
Building RPMs for Squid, SquidGuard
Squid Get a few dependencies to get the ball rolling: yum -y groupinstall “Development Tools” yum -y install rpm-build openjade linuxdoc-tools openldap-devel pam-devel openssl-devel httpd rpm-devel expat-devel db4-devel libpcap-devel Browse http://www.jur-linux.com/rpms/el-updates/5Client/SRPMS/ and find the latest Source RPM for your architecture, then install the sprm e.g. wget http://www.jur-linux.com/rpms/el-updates/5Client/SRPMS/squid-3.1.12-2.el5.src.rpm rpm -ivh squid*.src.rpm This does not actually install… Read more »