Install Ubuntu Server

Take backup of your data.

Make tar file:

# tar -cvzf maketarfile.tar.gz ./*

To know about tar more, try “man tar” in your command window.

./* use to give path of directory of which you make tar file. 
. is current directory
/ current directory inside
* consider everything

Copy to USB media:

# cp -r maketarfile.tar.gz /media/media_name

Unmount media after copied tar files:

umount mount point
ex : unmount /dev/sdb1

Install Ubuntu Server

Get USB media either bootable CD or pendrive of Ubuntu Server.
Insert USB in USB port.
Press favourable function key to enter boot menu.
Language setting : English US
Detect keyboard layout : NO, in our case. 
Keyboar layout setting : US

After loading additional components
hostname- Define hostname example abc.local
Creating manual partitions :
delete primary and logical partitions if exist.

  • create a new partition for home
  • Mount point /home
  • create a new partition for var 
  • Mount point /var
  • create a new partition for boot
  • Mount point /boot
  • Create a new partition for root
  • Mount point /

Done with disk patitioning.

Manage upgrades:
Softare Default Install Server
Install SSH Server
Install the GRUB boot loader to the master boot record

Finish Installation

Network Configuration for static IP

Open the /etc/network/interfaces file. I have used vi, but you can choose a different editor.

# vi /etc/network/interfaces

auto eth0
iface eth0 inet static

you can customize this to your network.

Set DNS nameserver either Open DNS and Google DNS:

Open DNS
Google DNS

# vim /etc/resolv.conf

Now you will just need to restart the networking components

# /etc/init.d/networking restart

Reboot you system

# sudo reboot

Six Month Training Experience

Before training, I have planned going to chandigarh for my 6 moths training. I wanted to work in an IT Company and side apart an IELTS Course. I have tried to find an IT Company, but unfortunately I did not have any relations with an IT Person. As my Training application submit date had come closer, I asked my friends where they would be joining. One of my friend Jaspreet Kaur Sarao replied and suggested me to join training in college campus, under Dr. H.S.Rai Dean of Testing & Consultancy Cell, Guru Nanak Dev Engineering College. Many questions were arising in my mind, as which language would be taught there?, On which technology we will work? Jaspreet answered all my questions. She told about her 6 weeks training. That she worked on open source Softwares and Linux. IT companies used windows or proprietry softwares, which is not good. She also gave example of old Trainee under Dr. H.S.Rai, is Parveen Arora. Who have selected in GSOC. Then I made up my mind to get trained under Dr. H.S.Rai, with hope of my best output. I have experienced various technical lectures on some language in my 6 weeks training are HTML, CSS, JavaScript,Ajax, PHP, MySQL learned from outside in an Institute. This was the only teaching method I knew.

At the time of Training, apart from my projects, which I experienced is not less then any IT company or a dream workplace. The best thing is “Environment”. Trainees shared their experience, ideas, problems on mailing list. Training has not based on any language, it has based on project-oriented approach or problem-oriented approach. The working technique has to get project and understand requirements. On the basis of requirements, learning process has begin. Searching on Internet is a first choice, and which made me feel independent. Tools and Techniques are practiced well from internet. The main part is code, which requires language, is choice to chose by self. Rule to use Open Source. I am Working on a linux Operating system and useing FOSS. I learned to manage code on github. Work is properly documented and blogged. Write daily diary during Training time which made me worked. I am updated with the new technology by attending seminars and Discussions on mailing list. I rely on Open Source, want to work with an Open Source organization, participate in GSOC.

After Training, I felt change in me, I no more need any institute to work on. I am self motivated. This change is only made because of my mentor Dr. H.S.Rai, which spend their valuable time on us. I always wish to remain his student for my lifetime. The most important thing is now I have learned how to work, how to solve my problems.

LDAP authentication in WordPress


Install LDAP
Install WordPress from 2.2 to 3.4 version


1. Create Users and Groups in LDAP.
2. Install wpDirAuth plugin in WordPress.
3. Configure wpDirAuth plugin. Steps to do this.
(i) Go to Directory Auth from settings menu.
(ii) Enable Directory Authentication to Yes if you want that WordPress authenticate LDAP users.
(iii) Requires SSL Login to Yes if you want WordPress login to do encryption.
(iv) Directory servers(Domain Controllers) means DNS or IP address. In my case I installed LDAP on my local server that is localhost.
(v) Account Filter means attribute of LDAP which authenticates WordPress login. In my case I chose cn(common name).
(vi) Base DN(distinguish name) contains the name of LDAP group of users you used to register in WordPress. In my case I have given ou=people,dc=navdeep,dc=bagga. Where ou=people is LDAP group of users.
(vii) Bind DN value contain admin of LDAP. Below given command displays the admin of your LDAP.

$ ldapsearch -x -b dc=debuntu,dc=local

In my case it is cn=admin,dc=navdeep,dc=bagga

(viii) Bind Password is a password of LDAP.

4. Save your settings by clicking on Update Options.
5. Go to Users menu and Click on ‘Add Directory Authenticated User’.
6. To register your LDAP user in WordPress, give filter attribute value in SSOID field which you have given in Account filter at the time you have configured plugin.In my case I have given name neha which is the value of cn in my LDAP. Define your role which you want to give to that member. Click on Add New User.
7. Open your login window in WordPress. Give ldap Username and password which you have registered in WordPress(step 6).

Configure gateway on ubuntu

Before configure gateway first install kannel

Configuration of gateway can be divided into two parts.

Bearerbox : bearerbox is a gateway, interface towards the phones. Its work is to keeping an eye on the gateway while it is running and use http interface to control the gateway.

smsbox : It handles sms gateway functionality. It contain sms-services, sendsms-user group which helps sms center to build.

sqlbox : (optional) sqlbox is used for DLR(delivery report) storage. Use to store logs of incoming and outgoing SMS in database.

Purpose of Using kannel : To send and receive sms for your application.

Requirements : GSM phone or modem (link to compatible.shtml)

Attach your phone or modem to the computer through USB cable.

Enter the following command in your terminal.

$ wvdialconf
 Note : run command with sudo user

If it display : No modem was detected.

Then your phone is not compatible with kannel.

If it display : Found an USB modem.

Then your phone is compatible with kannel.

Your connected device configuration written to /etc/wvdial.conf

Open wvdial.conf file in your favourite editor.

$ vim /etc/wvdial.conf

Value of Init1 ,Init2, Modem Type, Modem use in gateway configuration

Lets write configuration file for kannel.

Edit kannel.conf file on your desktop or anywhere you want in your file system.

core group is used for general bearerbox configuration. dlr-storage value is depend on which DBMS is used.

group = core
 admin-port = 13003
 admin-password =
 admin-allow-ip = ""
 dlr-storage = mysql //where to store the logs of sms
 smsbox-port = 13016
 log-file = "/var/log/kannel/bearerbox.log"
 access-log = "/var/log/kannel/access.log"
 box-allow-ip = ""
 log-level = 0

smsc group include all variables which used to set SMS center in kannel. smsc-id value is name of device which is connected. modemtype and device change according to Modem value in wvdial.conf file

group = smsc
 smsc-id = Nokia
 smsc = at
 modemtype = USB Modem
 device= /dev/ttyACM0
 my-number = +919888888887
 connect-allow-ip =
 sim-buffering = false
 log-level = 0

mysql-connection group is used when mysql database is used to store data values. database,username,password variables values are database name,database username and password respectively.

group = mysql-connection
 id = mydlr
 host = localhost
 username = boot
 password = abc
 database = key
group = dlr-db
 id = mydlr
 table = dlr
 field-smsc = smsc
 field-timestamp = ts
 field-destination = destination
 field-service = service
 field-url = url
 field-mask = mask
 field-status = status
 field-boxc-id = boxc

Modem group is used to define Modem configuration. init- string variable value change according to Init value in wvdial.conf file

group = modems
 id = Nokia
 name = Nokia
 detect-string = "Nokia"
 init-string = "ATZ"
 init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
 message-storage = SM
 message-start = 0

smsbox group must define to use SMS Kannel

group = smsbox
 smsbox-id = mysmsbox
 bearerbox-host = localhost //hostname
 bearerbox-port = 13020
 sendsms-port = 13013
 global-sender = +919888888887 //your modem number
 access-log = "/var/log/kannel/smsbox-access.log"
 log-file = "/var/log/kannel/smsbox.log"
 log-level = 0
 mo-recode = true

smsbox route group is develop an interface between smsbox and bearerbox.

group = smsbox-route
 smsbox-id = mysmsbox
 smsc-id = Nokia

sendsms-user group is used to push SMS through browser. Variables username and password are used for authentication purpose.

group = sendsms-user
 username =
 password =
 concatenation= true
 max-messages = 10000

sms-service group is provide services to incoming SMS. Accepted-smsc variable means which SMS center used to accept as incoming SMS.

group = sms-service
 keyword-regex = .*
 catch-all = true
 accepted-smsc = Nokia
 max-messages = 99
 get-url = "http://localhost/api/sms.php?phone=%p&text=%a"

Edit sqlbox.conf file where your kannel.conf file is placed.

sqlbox group used to tell kannel about sms log table and insert table. The sql-insert-table is used to store SMS which we want to send and sql-log-table is show logs of sms which are send through kannel and log of delivery reports.

group = sqlbox
id = sqlbox-db
global-sender = "+919888888887"
bearerbox-host = localhost
bearerbox-port = 13016
smsbox-port = 13020
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = "/var/log/kannel/kannel-sqlbox.log"
log-level = 0

mysql-connection group explained before

group = mysql-connection
id = sqlbox-db
host = localhost
username = boot
password = abc
database = key

Lets send SMS through kannel through http(browser) and application. Excited 😉

Start kannel service: Run these commands on seperate Terminals sequentially with sudo user.

$ bearerbox -v 1 kannel.conf
$ sqlbox -v 1 sqlbox.conf
$ smsbox -v 1 kannel.conf

Set verbosity level
0 is ‘debug’.
1 is ‘info.
2 ‘warning’.
3 ‘error’.
4 ‘panic’.

Send SMS through browser : Open your favorite browser and type below given on address bar.


13001 is an admin-port number which is defined in core group.
username and password value which is define in sendsms-user group.
to value contain phone number to whom we want to send SMS.
text value contain content of SMS.

Send SMS through application : To send through application is just do one entry in send_sms table of defined database in config files.

Method : Write sql query which insert sender, receive number and message data in send_sms table. kannel automatically check send_sms table and send SMS.

sql code of tables



All the Best!

19 Nov 2012

Now Kannel can send and recieve messages
Problem : When I run bearerbox. It gives Generic error: ERROR
Solution : In kannel.conf file

By default sim-buffering = true
I change to this
sim-buffering = false

I get hint from Alvaro Cornejo reply on kannel mailing list.

RE: As you can see; it seems that your modem does not support SM (SIM) storage. Try defining equipment storage “EM” as yoru store. Check guide for details.

I help my friends Jaspreet Sarao, Damanpreet in mysql.
Jaspreet problem is in while loop of query.
Daman problem is how to get know about table is empty or not.
I suggest to use count function.

Outreach Program For Women

I want to participate in this internship program.

Process of program:
(i) Contribute any one organization in project.
(ii) Write application, give detail of done project and resume.
Submission date is 3 december.
(iii) Selected students are going for internship.

I am interested in these organizations and related projects.
1. OpenITP

(i) Integration between dokuwiki and etherpad-lite : pad-like interface for simultaneous multi-person DokuWiki editing that respects ACLs, can handle SSL.
(ii) UX designer at large : UX design task for a free software anti-censorship or anti-surveillance project

2. Deltacloud

(i) Improve deltacloud website : Improve site navigation, styling and documentation of Deltacloud in HTML, CSS

3. Wikimedia

(i) Write extension for pulling files from git repository : Write an extension that would accomplish most of the features offered by large pastebin websites, with the added bonus of being able to add code to a wiki page without copying and pasting.
(ii) Create an extention of mediawiki : Creating extensions to MediaWiki is a great way to make it better. It contributes something new and cool to the community, and the Wikimedia sites (including Wikipedia!) might even decide to deploy your software, if it’s really neat.


18 Nov 2012

My 7210 Nokia phone finally connected with kannel.
It show status OK.
But not sending messages.

Now every phone present in my home connect with kannel.
Why kannel website provide wrong information(

When I attach my Nokia 7210 phone to kannel and start bearerbox

bearerbox -v 1 kannel.conf

2012-11-18 21:32:58 [5100] [0] INFO: Debug_lvl = 1, log_file = <none>,
log_lvl = 0
2012-11-18 21:32:58 [5100] [0] INFO: MYSQL: Connected to server at localhost.
2012-11-18 21:32:58 [5100] [0] INFO: MYSQL: server version
5.5.28-0ubuntu0.12.04.2, client version 5.5.28.
2012-11-18 21:32:58 [5100] [0] INFO: DLR using storage type: mysql
2012-11-18 21:32:58 [5100] [0] ERROR: Couldn’t open logfile
2012-11-18 21:32:58 [5100] [0] ERROR: System error 2: No such file or directory
2012-11-18 21:32:58 [5100] [0] ERROR: Couldn’t open logfile
2012-11-18 21:32:58 [5100] [0] ERROR: System error 2: No such file or directory
2012-11-18 21:32:58 [5100] [0] INFO: SSL not supported, no SSL
initialization done.
2012-11-18 21:32:58 [5100] [0] INFO: HTTP: Opening server at port 13015.
2012-11-18 21:32:58 [5100] [0] INFO: BOXC: ‘smsbox-max-pending’ not
set, using default (100).
2012-11-18 21:32:58 [5100] [0] INFO: Set SMS resend frequency to 60 seconds.
2012-11-18 21:32:58 [5100] [0] INFO: SMS resend retry set to unlimited.
2012-11-18 21:32:58 [5100] [0] INFO: DLR rerouting for smsc id <Nokia> disabled.
2012-11-18 21:32:58 [5100] [0] INFO: AT2[Nokia]: configuration shows
modemtype <USB Modem>
2012-11-18 21:32:58 [5100] [0] INFO: AT2[Nokia]: modemtype not found,
revert to autodetect
2012-11-18 21:32:58 [5100] [0] INFO: —————————————-
2012-11-18 21:32:58 [5100] [0] INFO: Kannel bearerbox II version 1.5.0 starting
2012-11-18 21:32:58 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:32:58 [5100] [0] INFO: MAIN: Start-up done, entering mainloop
2012-11-18 21:32:59 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: Closing device
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: detect speed is 115200
2012-11-18 21:33:01 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:33:02 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: Closing device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: opening device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: Logging in
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: init device
2012-11-18 21:33:05 [5100] [6] INFO: AT2[Nokia]: speed set to 115200
2012-11-18 21:33:07 [5100] [6] INFO: AT2[Nokia]: AT SMSC successfully opened.
2012-11-18 21:33:07 [5100] [6] ERROR: AT2[Nokia]: Generic error: ERROR
It gives following error
Generic error: ERROR

Andreas Fink on kannel mailing list reply my mail
RE: Run it with debug level = 0 to see the AT comand.

Then I run bearerbox with this command
bearerbox -v 0 kannel.conf

But unable to find the problem

16 Nov 2012

I use to run kannel on ubuntu 10.04.Because when ever I try to install kannel on ubuntu 12.04. Problem occur in sqlbox
configure: error: Kannel gwlib is required!
Solved by using this command
svn co sqlbox

Now kannel run on 12.04

kannel Compatible devices(
Now the only problem is that I have no compatible device to run kannel.

The following command gives basic information about the modem port, speed, and init string, along with information about your Internet Service Provider (ISP), such as the phone number, your username, and your password.

$ wvdialconf
(with sudo permission)

PHP run in public_html of Debian Server

15 Nov 2012

Now I use stable version of kannel i.e kannel 1.4.3
when I run this command
bearerbox -v 1 kannel.conf

I got this error

2012-11-15 16:46:19 [11852] [6] PANIC: AT2[Nokia 7210]: Cannot detect
modem and generic not found
2012-11-15 16:46:19 [11852] [6] PANIC: bearerbox(gw_panic+0xd2) [0x80cd372]
2012-11-15 16:46:19 [11852] [6] PANIC: bearerbox() [0x806db53]
2012-11-15 16:46:19 [11852] [6] PANIC: bearerbox() [0x80c303b]
2012-11-15 16:46:19 [11852] [6] PANIC:
/lib/i386-linux-gnu/ [0xb775bd4c]
2012-11-15 16:46:19 [11852] [6] PANIC:
/lib/i386-linux-gnu/ [0xb7231d3e]

12 Nov 2012

When I tried to install kannel on ubuntu 12.04 LTS.
problem occur in sqlbox installation.
I use this version of kannel.
gateway-1.5.0.tar.bz2 development version.
I don’t know which version of kannel and sqlbox I use on ubuntu 12.04?

which GSM modem should I use to connect with kannel?