Posts By :

Roderick Derks

Installing VMware Tools in Fedora Core 5 150 150 Roderick Derks

Installing VMware Tools in Fedora Core 5

# Install software called by VMware Tools

yum install gcc

# Install kernel header files
yum install kernel-devel

# Check it matches the running kernel
uname -r # running kernel
rpm -q kernel-devel # installed kernel headers
# It the two versions do not match, run
yum -y upgrade kernel kernel-devel
# then reboot (but only if they did not match).

# Find out where the kernel headers are
echo /usr/src/kernels/$(uname -r)-$(uname -p)/include
# You need this later.

# If you already have VMwareTools-5.5.1-19175.tar.gz on disk, SKIP THIS STEP!
# Download VMware-workstation-5.5.1-19175.tar.gz from vmware.com
# Extract the VMware Tools iso from it
tar --strip-components=3 -zxvf VMware-workstation-5.5.1-19175.tar.gz
vmware-distrib/lib/isoimages/linux.iso
# Create a temporary mount point
mkdir /mnt/vmtools-temp
# Mount the image
mount -o loop linux.iso /mnt/vmtools-temp
# Copy VMware Tools from the mount
cp /mnt/vmtools-temp/VMwareTools-5.5.1-19175.tar.gz /tmp/
# Unmount the image and tidy up
umount /mnt/vmtools-temp
rmdir /mnt/vmtools-temp
rm linux.iso

# Unpack VMware Tools to a temporary directory
cd /tmp/
tar zxvf VMwareTools-5.5.1-19175.tar.gz
cd /tmp/vmware-tools-distrib/
./vmware-install.pl
# Do you want to run vmware-config-tools.pl? no

# Backup vmware-config-tools.pl
cp /usr/bin/vmware-config-tools.pl /usr/bin/vmware-config-tools.pl.orig

# Patch VMware Tools
cd /tmp/
wget http://platan.vc.cvut.cz/ftp/pub/vmware/vmware-tools-any-update2.tar.gz
tar zxvf vmware-tools-any-update2.tar.gz
cd vmware-tools-any-update2/
./runme.pl
# Do you want to run vmware-config-tools.pl? no

### NOTE: if you have a recent kernel, you must skip this patch
### This commented out step will be removed shortly.
## Backup vmware-config-tools.pl
#cp /usr/bin/vmware-config-tools.pl /usr/bin/vmware-config-tools.pl.prepatch
## Apply patch to vmware-config-tools.pl
#cd /tmp/vmware-tools-distrib/bin
#wget http://www.thoughtpolice.co.uk/vmware/howto/vmware-config-tools.pl.patch
#patch /usr/bin/vmware-config-tools.pl /tmp/vmware-config-tools.pl.patch
###

# Run the config script
/usr/bin/vmware-config-tools.pl

# Link to the VMware mouse driver
ln -s /usr/lib/vmware-tools/configurator/XOrg/6.8.x/vmmouse_drv.o /usr/lib/xorg/
modules/input/

# Change xorg mouse
vi /etc/X11/xorg.conf
Change "mouse" to "vmmouse" in Section "InputDevice"

# Restart X
# (press ctrl+alt+backspace)
FC5 error: Deprecated pam_stack module called from service “imap” 150 150 Roderick Derks

FC5 error: Deprecated pam_stack module called from service “imap”

Problem 

After installing FC5 and configuring the first in the LogWatch daily report gave me tis error (from the /var/log /security logfile):

——————— sasl auth daemon Begin ————————

**Unmatched Entries**

Deprecated pam_stack module called from service "imap"
Deprecated pam_stack module called from service "imap"

Solution

It appears that from FC5 onwards, lines like this in PAM configuration files:
auth required pam_stack.so service=system-auth
account required pam_stack.so service=system-auth

Should be replaced by:
auth include system-auth
account include system-auth

The error message will not be shown anymore, now a correct logentry will be added:
 runuser: pam_unix(runuser:session): session opened for user cyrus by (uid=0)

Linux: search and replace commands 150 150 Roderick Derks

Linux: search and replace commands

Search and replace one file with the same name in several directories
# find . -name "favicon.ico" -exec cp /username/images/favicon.ico {} \;
# find . -name "favicon.ico" -exec ls -al {} \;

Search and replace files with the same name or the same part of the name
# find . -name file.cfg.old -exec rename .cfg.old .cfg {} \;

Find files containing a certain string
# find . -type f -exec egrep -i "search_this_string" /dev/null {} \;

Search .c and .h for "search string" in this dir and below
# find -name "*.[ch]" | xargs grep -E "search string"

Finds all files created in the last day that are larger than 150GB.
# find / -mtime -1 -size +150000000 -print

Search and replace text in several files:
# perl -pi -e "s/search/replace/g;" *.txt

recursively:
# find ./ -exec perl -p -i -e ’s/search/replace/g’ {} \;
# find . -name '*.cfgl' -print0 | xargs -0 perl -pi -e 's/search/replace/g'

Add text from a file to al files in a directory:
for i in `ls -b .`; do cat ../add >> $i; done

Replace a certain string in a file by anther string from the same file using a variable:
for file in $(grep -l "vervang" *); do host_name=$(cat $file|grep host_name|grep -v verv|awk 'BEGIN {FS = "host_name"} {print $2}' |awk '{print $1}'|awk '{print $0}'); echo hostname is $host_name ; sed "s/vervang/${host_name}/g" $file >/tmp/$$ && mv /tmp/$$ $file;donefor file in $(grep -l "##HOSTNAME##" *); do host_name=$(cat $file|grep " host_name"|grep -v HOSTNAME|awk 'BEGIN {FS = "host_name"} {print $2}' |awk '{print $1}'|awk '{print $0}'); echo hostname is $host_name ; sed "s/##HOSTNAME##/${host_name}/g" $file >/tmp/$$ && mv -f /tmp/$$ $file;done

Search files that are:
newer than today 00:00 hr:
touch -t `date +%m%d0000` /tmp/$$| find . -type f -newer /tmp/$$

newer then today 14:00 hr:
touch -t `date +%m%d1400` /tmp/$$| find . -type f -newer /tmp/$$

recently new/updated files
find . -type f -printf "%TY-%Tm-%Td %TT %p\n" | sort | less

Search and remove a piece of text in a file
sed '/replace_this_piece_of_text/{
:loop
N
/till_this_piece_of_text/d
b loop
}' input_file.txt > output_file.txt

Or when using this in a script and using the same file for input and output (-i option for sed):

#! /bin/bash
function remove_it () {
sed -i ‘/Remove from/{
:loop
N
/Remove upto here/d
b loop
}’ $1
}
remove_it $1

Remove all lines starting with a hash

To remove all lines starting with hast sign (#) from a file, try this:
sed /^#/d filename

The above command will remove all lines starting with # from its output. If you want to write the output to another file, use o/p redirection >
sed /^#/d filename > newfile

But, if you want to over write the file with new o/p, use -i option with sed.
sed -i /^#/d filename

Howto create favicon.ico 150 150 Roderick Derks

Howto create favicon.ico

A Favicon is a little custom icon that appears next to a website's URL in the address bar of a web browser. And when I say little, I mean 16 pixels by 16 pixels. So if you like a good design challenge try your hand at this one.

All you need to add a Favicon to your site is a Windows Icon (.ico) file called favicon.ico that you upload to the main directory of your website.

Favicon examples

read more

Your own VPN with sslexplorer 150 150 Roderick Derks

Your own VPN with sslexplorer

Image
Would you like to have complete access to you network from wherever you are? Wel, it's possible and very easy to accomplish with sslexplorer, an open-source browser based SSL VPN solution. With sslexplorer you can create a VPN to your own network via port 433. You can control your own network from behind almost any firewall. Wow!

There are two editions: the enterprise and the community edition. The latter is the free edition, enterprise gives you more features, is supported and has a price tag. In this article we will discuss the installation of the community edition.

This article has been updated on 01-nov-2006.

read more

How to upgrade Joomla 150 150 Roderick Derks

How to upgrade Joomla

Upgrading Joomla to a new version is very easy… read more

Linux DNS setup 150 150 Roderick Derks

Linux DNS setup

LAMP: Linux Apache MySQL PHP

This tutorial explains how to setup a DNS master and slave server using RedHat Linux. This configuration is tested on RHES 4.0 and Fedore Core 5 systems. Configuration for both is the same.

11-02-2007: I recently added a new article: Howto setup dynamic DNS

read more

Mailserver: Cyrus IMAP and Sendmail installation 150 150 Roderick Derks

Mailserver: Cyrus IMAP and Sendmail installation

cyrusThis article descibes the configuration of an IMAP server. The software I used was Fedora Core 4, 5 and 6 and Red Hat AS 4.0 and Cyrus Imap. Before you get started it is advisable and really cool to create a (dymanic) DNS service on your network. read more

Fetchmail configuration 150 150 Roderick Derks

Fetchmail configuration

Configure Fetchmail on your mailserver to collect email from your pop3 accounts all over the world. Examples added for non-secure and for secure pop3 accounts like gmail.

read more

NTP: example ntp.conf 150 150 Roderick Derks

NTP: example ntp.conf

Image Configure your server to use NTP for time synchronisation. In this example we are using a pool of NTP servers to connect to.

read more

Your Name (required)

Your Email (required)

Subject

Your Message

Your Name (required)

Your Email (required)

Subject

Your Message