..::capture of life::..

...my thoughts, learnings & captured images...

Our PRIDE...

From 16th December'08


This is our pride... Its nice to achieve victory after long 9 months war. We got our victory in 1971. But in reality do we get the victory??? In my opinion I think its not yet done... in geographically we are a free nation & there is an existence in the world map. But in the economically are we free??? But its Pride to have such country... By the time we will achieve all the things I HOPE & I think that HOPE gives all of us the inspiration of work...

Cox's Bazaar my 1st tour...

In mind there was always a dream to go for Cox's Bazaar. But I couldn't make time & scope to go there earlier. In this Eid vacation I made time to go there... The main thing is to manage my mother as I'm the youngest son & manage the office. My other 3 friends were also going there so it was nice opportunity to go there with them. I manage the opportunity.

Actually my Eid vacation started after the Eid, means I did duty in my office in the Eid day & after Eid day also. As its a multinational company & im in network section I have to stay in the office in the day time. I managed a ticket to Cox's Bazaar of "Silk Line" AC bus. My bus was at 11:00pm (10.12.08) from Arambag. I did my office then came to Narayanganj & got ready for the tour. My other friends already went to Cox's Bazaar. Im going single... By the mean time one of my friends named Tushar called me that he is also going to Cox's Bazaar. He came to know my trip information from Rumee 1 of my childhood friend. I reached in the bus station early & waiting for the bus. I was very much excited as its my 1st time I'm going alone in far distance.

My bus started at 11:11pm it was really a nice experience. At 1:00am (11.12.08) it went to Tajmahal hotel. It was a nice place. Here I captured some pictures.

At 5:42am I reached in the Cox's Bazaar. It was in front of Albatross Resort. Here I understand what is called FOB means First On Boat. As I was new comer here I did not know the way to beach. I asked person whats the way to the beach. Then I went in the Labony point beach alone. It was really nice view & experience to see the SEA... I also saw the sun rise from here but its not special. Only one thing is when sun rises the color of the water is changing.

I met with my friend Tushar then went to Hotel Lauge where all my friends were staying. After becoming fresh we went to beach for taking bath. This is the first time im taking bath & water was too salty... uak thoo. But we enjoyed the sea waves. It was really nice.

After taking bath we returned hotel it was only walk distance. Then we take shower in the hotel washroom then lunch in the hotel dining with sea fish... it was breakfast & lunch together. Then we go out for Moheshkhali. We hired a CNG scooter & went to no 6 ghat for taking speed boat.

The fare is 80 taka per head in the speed boat. Which 14 minutes journey to reach Moheshkhali. But the natural scenery is nice. Here I captured some pictures of birds life style beside sea.

Then when we reached in the Moheshkhali we saw how shutki was making. Here we also saw big Baine fish also. Thats size was unbelieveable.

We walked to reach the Budha Mandir & then Adinath Mandir. Both are nice. Its something like travel & tritha braman together...

While we were returning 1st we hired a Sampan boat to reach the ghat then we ride in the trawler. We ride in the roof of the trawler I shoot the sun set from here. Here I captured some pictures sunset pictures also.

In the ghat here we saw a strange thing that is we had to give money in 3 places, 1 in the main ghat, 1 in the boat way (which is something like bridge) & at last boat man.

Then we took some refreshment. After that we went to Burmese market for shopping. I bought special Burmese pickle, nuts & chandan face pack for my sisters.

After that we went to sea shore that day was the full moon. We took our dinner at Diamond Palace restaurant. The foods are really delicious & price are reasonable. We returned hotel & took some refreshment then went to Sea Shore as it was the FULL MOON. We stayed here for a long time. It was another experience feeling enjoying full moon in the sea side. We set in the top of Sweety's finger. Then my feeling was missing someone special but don't know whom as there is no one special in my life. It was really luck to enjoy full moon in the sea side. Late at night we returned home & the next days plan in going to Enani beach & Himsori.

We booked a CNG scooter yesterday & that was our ride for going there. We went 4 persons there as Tusher was too tired to go outside. In Enani beach we saw crap (kakra) & the hole of their house. After that we went to Himsori & took the breakfast here. We ride in the hill for watching the sea from the upper area. It was nice view just awesome. Here there is fountain but it is too little. Here I used tripod to capture some pictures. We returned hotel by 12:00pm. The way to go there is pleasant one.

After returning from here we went to beach. At that time we were only two person as other there were going to take lunch as they will return home by night. While we were taking bath then I feel very lonely as all other were with there family. Then my feeling was just... I decided to come home. After finishing bath we returned hotel & took shower then I talked with my mother from my friends mobile as I gave my mobile & all other things to Shovan. We went to Diamond palace restaurant. On the way to go there I went to Mercedes-Benz counter to buy a ticket to Dhaka. I got nice seat which is C3 & C4. It was amazing to got these seat in these rush time. It was actually some one canceled their ticket. I confirmed the ticket of C4 over phone. We came to beach after finishing the lunch. We hired two deck chairs to enjoy the sun set & the beach.

After the sun set Tushar & me went to Burmese market again to do shopping. I bought some pickle, one chain made of pearl, one bed cover & lot of dried fish specially sea fish. After doing shopping we took sweet & parota from Pal's sweat, those are really nice. Then we returned to hotel & just pick the bag & went to bus counter.

I reached the bus counter in time but bus was not in time. It was almost 30 minutes late wheres it was suppose to come by 9:00pm.

In the bus there was another surprise for me. When I went to bus I saw there was someone else in my seat. I complained about it & after that I got my seat. The bus service was really bad. It was just like local bus in high configuration & the seat was not good at all not comfortable. There was another surprise waiting for me. I was supposed to left in “Sign Board” which is the easy & short way to go Narayanganj. But the supervisor forgot to inform me & thats why I had to go to Dhaka then came back to Narayanganj. With out the bus journey by Mercedes-Benz overall the trip was very short but really nice... :-)

Person fishing in the river




Person fishing in the river, originally uploaded by p!cklu.


Its my first post in the flickr site... I am trying to learn photography... & its one of them. I shot it on the way to Rahimabad near Narshingdi. The way is too much nice & pleasant for photo shooting I think. On the way one could get river, natural environment & the taste of village life or rural life...

Gayatri Mantra







AUM BHOOR BHUWAH SWAHA,
TAT SAVITUR VARENYAM
BHARGO DEVASAYA DHEEMAHI
DHIYO YO NAHA PRACHODAYAT.


Summary of the Gayatri Mantra



Gayatri Mantra (the mother of the vedas), the foremost mantra in hinduism and hindu beliefs, inspires wisdom. Its meaning is that "May the Almighty God illuminate our intellect to lead us along the righteous path". The mantra is also a prayer to the "giver of light and life" - the sun (savitur).



Oh God! Thou art the Giver of Life,
Remover of pain and sorrow,
The Bestower of happiness,
Oh! Creator of the Universe,
May we receive thy supreme sin-destroying light,
May Thou guide our intellect in the right direction.


Word for Word Meaning of the Gayatri Mantra



Aum = Brahma ;
bhoor = embodiment of vital spiritual energy(pran) ;
bhuwah = destroyer of sufferings ;
swaha = embodiment of happiness ;
tat = that ;
savitur = bright like sun ;
varenyam = best choicest ;
bhargo = destroyer of sins ;
devasya = divine ;
these first nine words describe the glory of God
dheemahi = may imbibe ; pertains to meditation
dhiyo = intellect ;
yo = who ;
naha = our ;
prachodayat = may inspire!
"dhiyo yo na prachodayat" is a prayer to God

Hence the Gayatri is unique in that it embodies the three concepts of stotra (singing the praise and glory of God), dhyaana (meditation) and praarthana (prayer).

Advanced SSH security tips and tricks

Change SSH listening port

By default, SSH listens for connections on port 22. For security reason person can change the port for listening. Then other person connecting from the network have to specify the port number otherwise connection will be refused.

Open the /etc/ssh/sshd_config file and look for the line that says:

Port 22

Change the port number and restart the SSH service:

/etc/init.d/ssh restart

Suppose new port number is 222. Then only those person can connect to my PC who knows my new PORT number. Then person have to specify the port number while connecting via SSH

[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.6.9 port 22: Connection refused // as I made change in the listening port.

[email protected]:~$ ssh -p 222 [email protected]
[email protected]'s password: // when particular port number is given then it gives the password prompt.

Allow only SSH protocol 2

There are two versions of the SSH protocol. Using SSH protocol 2 only is much more secure.

Edit /etc/ssh/sshd_config and look for the line that says:

Protocol 2,1

Change the line so it says only protocol 2.

SSH with graphical interface

If any one is willing to access the remote PC with graphical interface then user have to use a switch -Y.

command is like this

[email protected]:~$ ssh -Y [email protected]

Allow only specific users to log in via SSH

User should not permit root logins via SSH, because this is a big and unnecessary security risk. Configure SSH server so that root user is not allowed to log in. Find the line that says:

PermitRootLogin yes

Change yes to no and restart the service. You can then log in with any other defined user and switch to user root if you want to become a superuser.

If you would like to have a list of users who are the only ones able to log in via SSH, it can also be specified in the sshd_config file. For example, let's say I want to allow users mishu, and rumee to log in via SSH. At the end of sshd_config file I would add a line like this:

AllowUsers mishu rumee

Using DSA/RSA public key authentication

Instead of using login names and passwords for SSH authentication, user can use DSA/RSA public keys for authentication. Note that user can have both login names and DSA/RSA public key authentication enabled at the same time. User need a pair of DSA/RSA keys -- one public and one private. User keep the private key on your machine and copy the public key to the server or other machine where s/he wants to login. When user wants to log in to an SSH session, the server checks the keys, and if they match, you are dropped into the shell. If the keys don't match, you are disconnected.

In this example the private machine (from which I will connect to the server/other machine) is station1 and the server machine is server1. Procedure is following:

First I need to create a pair of keys on my private machine.

[email protected]:~$ ssh-keygen -t rsa

There will be prompted for a pass-phrase for your private key, but it can be blank because this is not a recommended method. A key pair is generated: private key is located in ~/.ssh/id_rsa and your public key is located in .ssh/id_rsa.pub.

Next, copy the contents of ~/.ssh/id_rsa.pub to server1 into the ~/.ssh/authorized_keys file.

If the file ~/.ssh/authorized_keys already exists, append the contents of the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys on server1 by following command.

cat id_rsa.pub >> .ssh/authorized_keys

The only thing left to do is to set the correct permissions of ~/.ssh/authorized_keys file on server1:

~$ chmod 600 ~/.ssh/authorized_keys

Now, configure the sshd_conf file to use the DSA/RSA keys authentication. Make sure you have the following three lines uncommented:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys

Restart the service. If everything configured correctly, user should now be able to SSH to the server without any interaction.

If you would like to use DSA/RSA authentication only, make sure you uncomment and change the PasswordAuthentication line in sshd_config from yes to no:

PasswordAuthentication no

If anyone tries to connect to your SSH service and doesn't have a public key on the server, he will be rejected without even seeing the login prompt with this error:

Permission denied (publickey).

N. B. If .ssh or its parent directory is group writable then this will not work.

Create a custom SSH banner

If you would like any user who connects to your SSH service to see a specific message, you can create a custom SSH banner. Simply create a text file (in my example in /etc/ssh-banner.txt) and put any kind of text message in it; for example:

*****************************************************************
*This is a private SSH service. You are not supposed to be here.*
*Please leave immediately. *
*****************************************************************

When done editing, save the file. In the sshd_conf file, find a line that says:

#Banner /etc/issue.net

Uncomment the line and change the path to your custom SSH banner text file.

Shebang

In computing, a shebang (also called a hashbang, hashpling, or pound bang) refers to the characters "#!" when they are the first two characters in a script file. Unix-like operating systems take the presence of these two characters as an indication that the file is indeed a script, and attempt to execute that script using the interpreter specified by the rest of the first line in the file. For instance, Bourne shell scripts always start with the first line:

#!/bin/sh

More precisely, a shebang line consists of a number sign and an exclamation point character ("#!"), followed by the (full) path to the interpreter program that will provide the interpretation. The shebang is looked for and used when a script is invoked directly (as with a regular executable), and largely to the end of making scripts look and act similarly to regular executables, to the operating system and to the user.

Example shebang lines

Some typical interpreters for shebang lines:

  • #!/bin/bash — Execute using the Bourne-again shell
  • #!/bin/bash -c '/bin/bash' — Execute using bash in the /bin/ directory, and calls bash inside the /bin/
  • #!/bin/csh — Execute using csh, the C shell
  • #!/bin/ksh — Execute using the Korn shell

remote copy using rsync

Sometimes its better to use rsync then scp command for copying file from remote machine where bandwidth is one of the issue. You can specify the bandwidth usage in the rsync but this facility is not available in scp.

command format:

rsync [OPTION]... --bwlimit=XX [[email protected]]HOST:SRC DEST

-v, –verbose increase verbosity
-a, –archive archive mode; same as -rlptgoD (no -H, -A)
-u, –update skip files that are newer on the receiver
-r, –recursive recurse into directories
-e ssh = specify the remote shell to use
--bwlimit=KBPS limit I/O bandwidth; KBytes per second

e.g.: rsync -av --bwlimit=XX -e ssh [email protected]:/path_of_the_SRC_file /path_where_it_will_stored

Some times you will find error like
ld.so.1: rsync: fatal: libgcc_s.so.1: open failed: No such file or directory
i.e. no libgcc found on /usr/local/lib and rsync always look for libgcc_s.so.1 on /usr/local/lib
Then simply make a soft link
ln -s /usr/sfw/lib/libgcc_s.so.1 /usr/local/lib/libgcc_s.so.1 [on Sun host only]

Port forwarding through ssh

There are two kinds of port forwarding: local and remote forwarding. They are also called outgoing and incoming tunnels, respectively. Local port forwarding forwards traffic coming to a local port to a specified remote port.

For example, if you issue the command

ssh2 -L 1234:localhost:23 [email protected]ost

all traffic coming to port 1234 on the client will be forwarded to port 23 on the server (host). Note that localhost will be resolved by the sshdserver after the connection is established. In this case localhost therefore refers to the server (host) itself.

Remote port forwarding does the opposite: it forwards traffic coming to a remote port to a specified local port.

For example, if you issue the command

ssh2 -R 1234:localhost:23 [email protected]

all traffic which comes to port 1234 on the server (host) will be forwarded to port 23 on the client (localhost).

It is important to realize that if you have three hosts, client, sshdserver, and appserver, and you forward the traffic coming to the client's port x to the appserver's port y, only the connection between the client and sshdserver will be secured. See Figure Forwarding to a third host. The command you use would be something like the following:

ssh2 -L x:appserver:y [email protected]


Burning tool for ubuntu (GnomeBaker)

GnomeBaker Features

Create data CDs.
Blank RW disks.
Burn DVDs.
Copy data CDs.
Copy audio CDs.
Support multisession burning.
Record to and burn from existing CD ISO images.
Can burn via SCSI and ATAPI on Linux kernels 2.4 and 2.6. Basically if cdrecord works, then GnomeBaker will work.
Drag and drop to create data CDs (including drag and drop to/from the Nautilus file manager).
Create audio CDs from existing WAV, MP3, FLAC, and Ogg files.
Integrate with GConf for storage of application settings.

Install GnomeBaker in Ubuntu

sudo aptitude install gnomebaker

This will complete the installation.

Checking any particular port is listening or not

telnet IP_address port_number

Then you can see the following message if everything is OK.

Trying IP_address...
Connected to IP_address.
Escape character is '^]'

If we press the Escape character then we will get a promt screen to execute command in that box.

press Ctrl+d to exit.

Runing GUI package problem in another user mode

To change a user shell

chsh -s /bin/bash

you are login with user picklu and now a you want to run a GUI package with user mishu and the GUI fails. There are two ways to solve this issue:

1. cd /home/picklu

cp .Xauthority /home/mishu

OR

2. xhost +x

export DISPLAY=:0.0

then run the package. Then you can get the GUI interface of the installer.

"sudo" without password...

If user is willing to work with sudo command without password then some change is needes in /etc/sudoers file.

# User privilege specification
root ALL=(ALL) ALL
picklu ALL=(ALL) NOPASSWD:ALL //this line is added for picklu user

Printing from ubuntu

For printing from ubuntu we need the following packages. Usually it is given in latest ubuntu.

cupsys foomatic-filters-ppds smbclient

After installing them by apt-get install we need some configuration change.

If this /etc/cups/supsd.conf exists then need to change the following line

Listen :631

And put entry Allow all in the following section of the /etc/cups/cupsd.conf file

Restrict access to the server

Restrict access to the Admin page

Restrict access to the configuration file

Now restart your cups server by executing /etc/init.d/cups start

Open your browser and type

http://localhost or IP :631

You will now find a web utility and provide the correct info there and you are done.

N.B. During configuration you must select the option “Windows printer by samba”

Listening which port

To see which port is listening... in Solaris.

netstat -f inet -an|grep LISTEN

Installing .deb package

For installing .deb package we need to use dpkg. which is a tool to install, build, remove and manage packages. dpkg itself is controlled entirely via command line parameters. For example -i use to install .deb file.

Command for installing any package ist

cd /to that directory where the package is

sudo dpkg -i package_name.deb

Compiling alsa

My vivo laptop (VGN-FZ41E) was having problem in sound only in the jack (head phone). Built in speaker sound was fine but in the jack there is no sound. Thats why I need to install alsa in my ubuntu 8.04.

Dependencies:

            libncurses5 libncurses5-dev
gettext ja-trans

Required Src:

            alsa-lib-1.0.xx alsa-utils-1.0.xx alsa-driver-1.0.xx

Installation Instruction:

           First compile alsa-lib
Then alsa-utils
And lastly alsa-driver

thats and finally run alsaconf to install the drive.

Then it may be needed to make reboot the box. After that if this occurs again then may be needed to run alsaconf again.

***One thing I also add a line (options snd-hda-intel model=vaio) at the last of /etc/modprobe.d/alsa-base file.***

./configure error in ubuntu

While compiling in ubuntu there may be error telling

checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

The solution is installing the libc6-dev

#apt-get install libc6-dev

SCP command to copy from another host...

Sometimes it is nessecary to copy somethings directly from another host without logging in then the folllowing command is very usefull...

$ scp  :  

Setting the number line in vi-editor

It some time important to see the number line in vi editor. Then for current session setting the need to write the following command

:set nu

For permanent setting up the number line we need to write following command

echo "set nu" >> .vimrc

How to synchronize clock with NTP server

Basically ntpdate command synchronize the clock with specified ntp server. To synchronize the clock with ntp server all the time when you start your machine do the followings.

First Create a file named setdate with any editor and write the following line in the file

  #!/bin/bash
case "$1" in
start)
ntpdate sol(ntp server)
;;
stop)
;;
esac
exit 0

copy the file(setdate) by the following command to the location /etc/init.d/

    # cp setdate /etc/init.d/setdate
    # chmod 751 /etc/init.d/setdate

Now create startup scripts to sync the time during system boot.

    # update-rc.d setdate defaults

Also run tzselect to define time change(super user/normal user), Change timezone in /etc/timezone file and put the following line in /etc/bash.bashrc file, user's .bashrc' and .bash_profile file which user you want to get syncronized

    TZ='Asia/Dhaka'; export TZ;

Reboot your machine to get effects.

apache installation in Solaris

Download: First download the source of the apache from its original site "http://archive.apache.org/dist/httpd/". Here all versions are archived choose which version you want to install.

Extract: If that file is in .tar.gz format. In Solaris you have to first unzip that file

$ tar xvzf httpd-NN.tar
$ cd httpd-NN

NN is the version number of apache

Configure: ./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=all --enable-ssl --enable-proxy=shared

--prefix=/usr/local/apache2 in this location apache will be installed.

--enable-so Enable DSO capability provided by mod_so. (modularizing the apache)

--enable-mods-shared=all all modules are shared.

--enable-ssl Enable support for SSL/TLS provided by mod_ssl.

--enable-proxy=shared The proxy module will be build as DSO module.

In my case while configuring the apache I fall in the problem about gcc compiler. I have to add the path of the gcc compiler (/usr/sfw/bin) in my .profile file which determines my environment.

In ubuntu 9.04 I need to install g++, zlib1b, zlib1b-dev & libssl-dev for error free compilation.

Compile: $ make

Normally make command will not execute in the shell we have to find the file executes the make command that path (/usr/ccs/bin) should be added in the .profile file also.

Install: switch to root user & then make install

Customize: # vi PREFIX/conf/httpd.conf

after that checking the syntax of the httpd.conf file is necessary.

To me main thing in the apache is configuring the httpd.conf file.

for checking we have to execute the following command

$ PREFIX/apache/bin/httpd -t

Test:

starting the apache become the root user (as apache is listening in the 80 port) & then run the following command

# PREFIX/apache/bin/apachectl -k start
For checking whether apache is running or not netstat -f inet -an | grep 80 or netstat -an|grep -i lis|grep 80 (in ubuntu) & noticed that *.80 is LISTEN

after that in the browser write http://localhost/ then we can see the index file from htdocs

folder or which is default file written in the configuration file of the apache.

# PREFIX/apache/bin/apachectl -k stop //stopping the apache.

Changing HOST name in Solaris

To change the hostname on a Solaris system:

1. Change the hostname in /etc/nodename.Replace the information in this file; commenting out the previous value will cause problems during a reboot.

2. Change the hostname in /etc/hostname.network_interface (e.g., /etc/hostname.hme0). Replace the information in this file; commenting out the previous value will cause problems during a reboot.

3. Change the hostname in /etc/hosts

4. Change the hostname in /etc/inet/ipnodes (Solaris 10 or later)

After that reboot the BOX then new host name will take effect.

Changing file attributes

chmod command is used to the change a file's permissions. Only the user who
owns the file can change the permissions of a file (the root user can also do it).
chmod [-R] operation files
chmod 777 add rwx permission for owner,group&others [numeric method]
chmod u+rwx g-w add rwx permission to owner& remove w of group of file [symbolic]
chmod -R a-x /tmp turn off x permissions,for all users,for all files in the /tmp.

Process control

kill    sends a signal to processes, causing them to terminate
or otherwise
act upon receiving the signal in some way.
kill -1 PID reboot the process
kill -9 PID terminate the process
kill all stop all the daemon of that process
pkill terminate the respective process daemon

User Information

id prints information about the given user
id picklu //print information about user(including uid, gid, groups, etc)

whoami //prints the user name associated with the current effective user ID.

groups //prints the names of the primary and any supplementary groups for each

fingers //displays information about the system users

who //show who is logged on
who -a show all users log on to the system in different terminal.

su allows one user to temporarily become another user
su become root user
su - become root user with all the all the environment
su - change to supplied user

Viewing Disk usage

df        df' reports the amount of disk space used and available on file systems.
options df -hT /home
-h print sizes in human readable format (e.g., 1K 234M 2G)
-T print file system type

du
Summarize disk usage of each FILE, recursively for directories
i.e.estimate file space usage.
options du -sh /home
s display only a total for each argument

To view the output of parts of files

head  output the first part of files [usually first 10 lines]
we can use option such as we want to watch first 15 lines
head -15

tail output the last part of files[usually last 10 lines]
we also can use same options as in head

To view the output of entire files

cat concatenate files and print on the standard output [top - bottom]

tac concatenate and print files in reverse [bottom – top]

nl display the content of file with line number

add2any