Sunday, December 10, 2006

LTTE Fires At Civilians At Kallar, Trincomalee

The LTTE terrorists fired artillery at the Somadevi School at 11.30 a.m, Thursday the 7th of December injuring a teacher and 11 school children.

Actually I can not believe what these crazy people needs after doing this type of things.

Sunday, December 03, 2006 is a good web site which giving day to day information about Sri Lankan government vs. LTTE terrorists civil war. Visit there and if you have a web site put a link. also related to that.

Sunday, November 12, 2006

University of Peradeniya

My university is 'University of Peradeniya'.. (people are calling it just 'pera uni'). There you can find lots of very nice views. I was able to capture some of nice pictures. Here I have added one.


Sunday, October 29, 2006

3D Desktops on Linux

Do you have any experience with 3D desktop. It's very nice and it makes new path to new generation.
visit following sites to get news about that

good articale here

good manual pages here <<>>

download from soruceforge

Sunday, October 22, 2006

Openwebmail configuration

You can see configuration file here

Apache web server with cgi enabled
Perl 5.005 or above (required)
MIME-Base64-3.01.tar.gz (required)
libnet-1.19.tar.gz (required)
Digest-1.08.tar.gz (required)
Digest-MD5-2.33.tar.gz (required)
Text-Iconv-1.2.tar.gz (required)
libiconv-1.9.1.tar.gz (required if system doesn't support iconv)

CGI-SpeedyCGI-2.22.tar.gz (optional but highly recommended, for persistent running)
Compress-Zlib-1.33.tar.gz (optional, for HTTP compression)
ispell-3.1.20.tar.gz (optional, for spellcheck)
Quota-1.4.10.tar.gz (optional, for unixfs quota support)
Authen-PAM-0.14.tar.gz (optional, for auth_pam support)
openssl-0.9.7d.tar.gz (optional, for pop3 over SSL support,
required only if system doesn't support libssl) (optional, for pop3 over SSL support)
IO-Socket-SSL-0.96.tar.gz (optional, for pop3 over SSL support)
clamav-0.70.tar.gz (optional, for viruscheck,
available at
Mail-SpamAssassin-3.02.tar.gz (optional, for spamcheck,
available at
antiword-0.35.tar.gz (optional, for msword preview)
ImageMagick-5.5.3.tar.gz (optional, for thumbnail support in webdisk)
tnef- (optional, tnef is used mostly by mails from MS Outlook and Exchange)
wget-1.9.1.tar.gz (optional, for URL uploading support in webdisk & msg composing)
lsof_4.73A.freebsd.tar.bz2 (optional, for openwebmail-tool --unlock)

for debian users:
openwebmail can download and install using apt-get put following tag in your /etc/ap/source.list file

deb ./

Thursday, October 19, 2006

Linux Introducing Program

I started new FOSS program in our university(University of Peradeniya). As the first step it follows Linux OS introducing for new Linux users. Today there were 30 students. I hope in next week there will be more than that (Including other faculties). In next step we will distributing GNU/Linux OS and Sinhala Linux Hand Book which was created by PDN-LUG.

UNIX/LINUX User's disk size calculating

I have created user's disk size eliminating script. Using this I could find out bad disk usages of users. Just copy paste into perl script, and run it on terminal. (perl
#Created by :
# Nipuna Perera (nipunap at ceit dot pdn dot ac dot lk)
format top=
| | |Disk | |
|Username(UID)| Home directory |Space(Mb) |Security |
format STDOUT=
@<<<<<<<<<<<< @<<<<<<<<<<<<<< @>>>>>>>>>>>> @<<<<<<<<<< $uname, $home_dir, $disk, $warn +-------------+----------------+-------------+----------+ . open(PASSWD, "/etc/passwd") || die "Can n't open passwd: $!\n"; USER: while(){ chop; ($uname,$pass,$uid,$gid,$junk,$home_dir,$junk) = split(/:/); if ($uname eq "root" || $uname eq "nobody" || substr($uname,0,2) eq "uu" || ($uid <= 100 && $uid >0)){
next USER;
$warn = ($uid ==0 && $uname ne "root") ? "** UID=0" : "";
$warn = ($pass ne "!" && $pass ne "*") ? "** CK PASS" : $warn;

$uname .= " ($uid)";

if (-d $home_dir && $home_dir ne "/"){
$du = `du -s -m $home_dir`; chop($du);
($disk, $junk) = split(/\t/,$du); $disk .= " M";
$disk = $home_dir eq "/" ? "skipped" : "deleted";

If this is not working , you can use simple shell command to get disk space of each user.
du -scm /home/*
This will provide the output in mega bytes (MB), if you use 'k' rather using 'm' as a parameter, output will be in kilobytes KB (use man du for more information)
Samba user's file removing Script

Today i have created shell script for remove user's *.mp3 *.dat *.mpeg etc. files from server.

here it is..

#!/bin/bash #this script was written by Nipuna Perera
#mail :
#removing file extentions should be added here using spaces=> varFiles

varFiles="*.avi *.wav *.exe *.mpeg *.mp3 *.mpg *.dat *.dat *.wmv "

#Files contaning directories should be added here

varDIR="/export /export1 /export2 /export3" for i in $varFiles

echo "-------------------------------------------"
echo "Finding and removing $i files in $varDIR "
$i find $varDIR -name "$i" -print -exec rm -rf {} \; >> del_files1


after modifying this script, you also can use this.