IT

Mount a windows filesystem or network share in Linux 150 150 Roderick Derks

Mount a windows filesystem or network share in Linux

Overview of some linux commands to mount a Windows filesystem or a cifs share (Windows protocol).
Also information about how to install a ntfs driver if this isn't supported yet by your kernel.

read more

Linux Security Distro’s 150 150 Roderick Derks

Linux Security Distro’s

Here is a short overview of some Linux Security Distro's.

read more

Linux Wireless Commands 150 150 Roderick Derks

Linux Wireless Commands

Great collection of Linux commands to connect to a wireless network. Many thanks to wirelessdefence.org.
read more

Check your WiFi security 150 150 Roderick Derks

Check your WiFi security

Very important: check if your own WiFi LAN is secure. You need some tools to perform these actions. Easiest way to get these tools is to download and burn the backtrack cd iso file. Start your computer and boot from the cd. Slax (live cd version of Slackware) is used for the os. Most of the tools you need to do the job run on Linux, not on Windows. And there are a lot of neat tools on this cd.

As I'm learning more I'll update this post now and then. Have fun!

read more

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

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message