Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of Modern Operating Systems (3rd Edition)

RHCSA Preparation - Script to Configure a Simple OpenLDAP Server

The ability to quickly configure an LDAP (Lightweight Directory Access Protocol) client for accessing user and group accounts is one of the skills you are expected to have when you sit the Red Hat RHSCA exam. LDAP is a application-level protocol for accessing and maintaining distributed directory services over an IP-based network. It is specified in a series of RFCs (Request for Comments) using ASN.1. The latest LDAP specification is Version 3, published as RFC 4511. Typically, at a minimum, LDAP is used to facilitate centralized user and group account administration. Instead of storing user and group account information locally

Using Perl Net::IP to Manipulate IPv4 Addresses

In a previous post, I demonstrated a Korn shell script which determined the subnet mask for a range of IPv4 addresses. Perl has a module called Net::IP which provides a number of functions which can be used to manipulate IPv4 (and also IPv6) addresses to provide the same information and a lot more besides. For example, the following code outputs a lot of information about a classless prefix: use Net::IP; my $ip = new Net::IP (‘’) or die (Net::IP::Error()); print ("IP : ".$ip->ip()."n"); print ("Sho : ".$ip->short()."n"); print ("Bin : ".$ip->binip()."n"); print ("Int : ".$ip->intip()."n"); print ("Mask: ".$ip->mask()."n"); print ("Last:

Calculating Prime Numbers using Perl

Definition of a prime number: A prime number is defined by any number that is only dividable by 1 or itself. Except for 2 which is a prime, a prime number is always odd (2n+1) Here is a Perl script which outputs all the prime numbers between 0 and 10000: #!/usr/bin/perl my $UPPER = 10000; my $sieve = “”; print “2n”; for (my $guess = 3; $guess < = $UPPER; $guess+=2) { next if vec($sieve,$guess,1); print "$guessn"; for (my $mults = $guess * $guess; $mults