Knowledge Base

UPS Calibration procedure

Start —>Programs –>Accessories —>Communications —>Hyper Terminal

1. Press “Y” – You will get a prompt like “SM”

2.Press 1 two times with 3-5 sec interval(Left top button in keyboard)
You will get a prompt like “PROG”
3. Press 456
then check the last value if it is “A1” we don’t need to change the value
else change the value according to the UPS model

press +/- for changing the value
UPS Model Value
SUA1500I A1
SUA1000I A8
SUA3000I 96
4. u —> Setting upper power (max 264).
5. l —-> Setting lower power (min 196).
6. N —> Checking Serial number.
7. A —> Disply LED checking.
8. s —–> Sensitivity checking ( High,medium,low).
8. U —> This shows Power checking ( Do not check “U” in UPS connected machines).


Paswd change in kubuntu

How To Change Password In Ubuntu 7.04 PC Edition (with Dual Boot Win XP Pro)
Posted May 28, 2008
Filed under: Tech Bytes | Tags: dual boot, password recovery, Ubuntu 7.04, Windows XP |

This assumes you have a dual boot with Ubuntu 7.04 and Windows XP Pro. This is a great guide.

Boot up the PC and at the screen to select the OS (assuming you have edited the grub to automate the daul boot)

Select the option Ubuntu, kernel 2.6.20-15-generic (recovery mode) or equivalent

Press “e” to edit the commands

The next screen displays three lines as below

root (hd0,6) or equivalent
kernel /boot/vmlinuz-2.6.20-15-generic ………….. ro single
initrd /boot/initrd.img-2.6.20-15-generic

Select the second line (starting kernel /boot/vmlinuz …..) and select “e” to edit

This takes you to the end of the line. After ro single type rw init=/bin/bash and press Enter

Then press “b” to boot into the shell. NOTE: You are now logged in as root, be careful with the commands issued here.

The shell looks like this


At the prompt type as below to display the usernames created in Ubuntu

root@none:/#ls /home

To change the password for user named admin100 whose password you want to set as linux!kenya type as below

root@none:/#passwd admin100
Enter new UNIX password: linux!kenya
Retype new UNIX password: linux!kenya
passwd: password updated successfully ( this is displayed if all is OK)
root@(none):/#reboot (this reboots the PC)

Now login to Ubuntu with your new password.

NOTE: To change the root password while still in the shell, type as below

root@none:/#passwd root
Enter new UNIX password: !@%^&jkjkireykjavik
Retype new UNIX password: !@%^&jkjkireykjavik
passwd: password updated successfully


Solution to NIS not starting in Kubuntu is , delaying the start of NIS during

sudo mv /etc/rc2.d/S18nis /etc/rc2.d/S30nis
sudo mv /etc/rc5.d/S18nis /etc/rc5.d/S30nis

Its not the perfect fix , but yeah ubuntu is still working on it

Mysql Database

create database : –

mysql> create database myDB;
show databases;
use myDB
grant all privileges on myDB.* to ‘test’@’localhost’ identified by ‘test123’;
grant all privileges on myDB.* to ‘test’@’%’ identified by ‘test123’;
mysql> show grants;
safemode mysql
/usr/local/etc/rc.d/mysql-server stop
/usr/local/bin/mysqld_safe –skip-grant-tables &

select * from user where user=’root’;
update user set Password=PASSWORD(“radasm31”) where user=’root’;
flush privileges;

Quit mysql
/usr/local/etc/rc.d/mysql-server start


passwd change-:
pkill -9 mysql
mysqld_safe –skip-grant-tables &
UPDATE user SET password=password(‘passwd’) WHERE user=root
mysql -u root -h localhost -p
mysql> drop database award_mediawiki;


dump == mysqldump -u test_fbill test_feedbackbill -p > db_billing.sql


mysqldump -u [username] -p [database] > [database].sql
killall -9 mysql
mysqld_safe –skip-grant-tables &
mysql mysql
> update user set password=password(“aMDd5a^2x”) where user=”root”;
>flush privileges;
vi /root/.my.cnf




tar -zxvf ….. Decompress filename.tar.gz
tar -cvf binuloan.tar binuloan
tar.gz…tar -xzvf
tar -xvf filename.tar
tar xvf gnome-doc-utils-0.6.1.tar.bz2


Image resize script

# resize image to maximum dimension of $res and write to tmpdir.

ls -al | grep -i “.jpg” | awk ‘{ print $9 }’ > list.txt

mkdir $tmpdir >/dev/null 2>&1

exec < list.txt
while read lst
convert -quality $q -size $res -resize $res $lst $tmpdir/$lst >/dev/null
rm -f list.txt
tar -cvzf images.tar.gz $tmpdir
rm -rf $tmpdir

Apache / PHP

In httpd.conf
check and add these lines
1.)For php4
LoadModule php4_module libexec/
2.)In mod_dir
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
3.)AddType application/x-httpd-php .php
Apache 1.3.31
tar -xfz apache_1.3.31.tar.gz
cd apache_1.3.31
/configure –prefix=/usr/local/apache –enable-module=so
–enable-module=expires –enable-module=rewrite –enable-suexec
–suexec-logfile=/usr/local/apache/logs/suexec_log –suexec-caller=nobody
make install
tar -zxvf mhash-0.8.18.tar.gz
cd mhash-0.8.18
./configure –prefix=/usr
make install
Exif 0.5.12
tar -zxvf libexif-0.5.12.tar.gz
cd libexif-0.5.12
./configure –prefix=/usr
make install
Curl 7.11.1
tar -zxvf curl-7.11.1.tar.gz
cd curl-7.11.1
./configure –prefix=/usr
make install
tar -zxvf Sablot-1.0.1.tar.gz
cd Sablot-1.0.1
./configure –prefix=/usr
make install
CRYPT 2.5.7
cd libmcrypt-2.5.7
./configure –prefix=/usr –disable-posix-threads
rm -f /usr/lib/libmcrypt.*
rm -rf /usr/local/lib/libmcrypt
rm -rf /usr/lib/libmcrypt
make install
tar -zxvf gd-2.0.22.tar.gz
cd gd-2.0.22
rm -f config.cache
./configure –prefix=/usr
make clean
make libgd.a
cp -fv .libs/libgd.a .
make install
Check if /usr/include/freetype2 is present, if so set
ttfopts=”–with-ttf –with-freetype-dir=/usr –enable-gd-native-ttf”
else set ttfopts=”–with-ttf”
tar -xzf flash.tar.gz -C /usr/local
cd /usr/local/flash
ln -s . lib
cd /usr/local/flash
ln -s . include
Ming 0.2a
tar -zxvf ming-0.2a.tgz
cd ming-0.2a
make install
PHP 4.3.6
tar -jxf php-4.3.6.tar.bz2
cd php-4.3.6
–with-mysql=/usr or /usr/local/bin/mysql according to where mysql binary is.
–with-pgsql if directory /var/lib/pgsql exists


make install


Grub edit

(First of all, enter your BIOS setup and in BOOT Sequence window choose to boot with CDROM first.)

1) Boot with your Fedora Core Installation CD 1.

2) Type “linux rescue” at the prompt.

3) Answer the questions about keyboard and language.

4) Tell the rescue mode to use your proper partition to mount (the one that you want to get booted into)

Choose Continue

(Don’t choose Cancel or Read Only) because you want to edit grub.conf

5) When you come to the console prompt type:

sh-2.05# chroot /mnt/sysimage

6) Edit your grub.conf with nano, type:

sh-2.05# nano /boot/grub/grub.conf

7) You’ll only have to edit 2 lines:


root (hd0,4)
(This is your /boot partition, specifies which partition contains your Linux kernel image.
This is the grub.conf after editing your grub.conf

#grub.conf generated by anaconda



title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl)
root (hd0,5)

kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb
initrd /initrd-2.4.22-1.2174.nptl.img

title Microsoft Windows XP Pro
rootnoverify (hd0,0)
chainloader +1

8) Eject your Fedora Core installation CD1 and type exit to reboot your system.

sh-2.05# exit

VPN Client Setup

This is the procedure to install openvpn client

1. Install openvpn:

apt-get install openvpn

Then, download lzo-2.03 compression library from


Before installing it, do:

apt-get install libcurl4-openssl-dev

Then unpack lzo-2.03, cd to that folder and do:

sudo make
sudo make check
sudo make test
sudo make install

Once you are done with lzo install, cd to openvpn folder and do the following.

sudo make
sudo make install

Now, put your config file under /etc/client.ovpn and your keys under your Documents folder.
Make sure that you update client.ovpn so it reflects the new path. You can start the client using

/usr/local/sbin/openvpn –config /etc/client.ovpn

Next, you can create a shortcut. Make a small script /usr/local/bin/ and put
the following lines.(nano /usr/local/bin/

sudo /usr/local/sbin/openvpn –config /etc/client.ovpn

Change the permissions with chmod +x or chmod 744 if you want to have exclusive execute rights and then do:

sudo updatedb

.sh script


Setup SSH key

To ssh into server using ssh key. Follow these steps:

In the source server:

ssh-keygen -t rsa -N ''
Press Enter

Copy the key from that file.

Login to destination server and paste the key into the file:


How to configure NAT using IPtables
How to reset root password in FreeBSD
Vps Server Installation

NB :- Any doubts or clarifications contact

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s