PoiNtEr->: June 2011

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Wednesday, June 29, 2011

Install Telnet Server in Ubuntu

You will find the Telnet server installation packages in Synaptic under the telnetd package.If you want to install telnet server package you can also use the following command

sudo apt-get install telnetd

This will complete the installation.Now you Restart inetd service using the following command

sudo /etc/init.d/inetd restart

Once installed, select Administration, Services and enable Telnet

you can now fire up your other Linux box and type telnet . You are prompted to enter your username and password. The whole conversation should look like this

vishal@Eva:~$ telnet
?Invalid command
telnet> open       
Connected to
Escape character is '^]'.
Ubuntu 11.04
Eva login: vishal
Last login: Wed Jun 29 23:09:50 IST 2011 from localhost on pts/2
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-8-generic i686)

* Documentation:  https://help.ubuntu.com/


you can also try it from other system or from virtual machine(xp or any) to connect by using

“telnet ip address” of linux machine which is running telnet sever,after this it will ask you for login and thats it !!


Note that the server responds with Welcome to telnetserver, running Ubuntu LAMP server, which is a customized message. Your machine will probably respond with Ubuntu and some version information. This is insecure: giving away version numbers is never a smart move. In fact, even saying Ubuntu is questionable. Edit the issue and issue.net files in your /etc directory to change these messages.

Running the w command now shows you as connecting from the external IP address.


vishal@Eva:~$ w

23:36:16 up  4:23,  9 users,  load average: 0.41, 0.37, 0.29
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
vishal   tty7     :0               19:12    4:23m 14:51   0.34s gnome-session -
vishal   pts/1    localhost        23:08    7:00   0.61s  0.04s telnet 127.0.0.
vishal   pts/2    localhost        23:09    7:04   0.60s  0.53s -bash
vishal   pts/3    :0.0             23:10   25:16   0.25s  0.25s bash
vishal   pts/4    :0.0             23:15   19:42   0.27s  0.27s bash
vishal   pts/5    :0.0             23:18    0.00s  0.26s  0.01s telnet
vishal   pts/6    localhost        23:20    0.00s  0.57s  0.00s telnet
vishal   pts/7    42-109-121-228.l 23:20    0.00s  0.58s  0.00s w
vishal   pts/8    42-109-121-228.l 23:23   11:10   0.63s  0.57s -bash

c program

int a[7]={1,2,3,4};









C program




char *p=”UNIVERSITY”;






reason:suppose base address is 100 than

++*(100++)-> ++U –> V

Tuesday, June 21, 2011

Share Folder between Ubuntu(linux) and Windows machine

On Linux Machine
  install samba first
1:sudo apt-get install samba

   go to root directory
2:cd /
output: /
4:sudo mkdir realname
now change ownership
5:sudo chown vishal:vishal realname
you can check ownership by
6:ls -l
7:sudo smbpasswd -a vishal
enter your new samba password
8:sudo gedit /etc/samba/smb.conf

now add following line :
path = /realname
available = yes
valid users = vishal
read only = no
browsable = yes
public = yes
writable = yes

you can change above permission as you like by changing the values.

9:sudo /etc/init.d/samba restart

(above command will show your ip address of linux machine)
On window Machine
note ip address and put that in Window machine on RUn
put ip address in above given format in run.

thats it !!
now you can see realname folder in windows
use that folder to share things
HaPpy sharing :-)

Monday, June 20, 2011

HowTo: Find Out My Linux Distribution Name and Version

How do I find out what version of Linux distribution I'm using from the shell prompt?

To find out what version of Linux (distro) you are running, enter the following command at the shell prompt:
$ cat /etc/*-release
Sample outputs on Ubuntu v11.04:

lsb_release Command

The lsb_release command displays certain LSB (Linux Standard Base) and distribution-specific information. Type the following command:
$ lsb_release -a
Sample outputs:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty

How Do I Find Out My Kernel Version?

Type the following command:
$ uname -mrs
Sample outputs:
Linux 2.6.38-8-generic i686
  1. Linux - Kernel name
  2. 2.6.38-8-generic - Kernel version number
  3. i686 - Machine hardware name (32 bit)

Dr. APJ Abdul Kalaam's speech in Hyderabad

"I have three visions for India. In 3000 years of our history, people from all over the world have come and invaded us, captured our lands, conquered our minds. From Alexander onwards, The Greeks, the Turks, the Moguls, the Portuguese, the British, the French, the Dutch, all of them came and looted us, took over what was ours. Yet we have not done this to any other nation. We have not conquered anyone. We have not grabbed their land, their culture, their history and Tried to enforce our way of life on them. Why? Because we respect the freedom of others.
That is why my first vision is that of FREEDOM. I believe that India got its first vision of this in 1857, when we started the war of Independence. It is this freedom that we must protect and nurture and build on. If we are not free, no one will respect us.
My second vision for India's DEVELOPMENT, For fifty years we have been A developing nation. It is time we see ourselves as a developed nation. We are among top 5 nations of the world in terms of GDP. We have 10 percent growth rate in most areas. Our poverty levels are falling. Our achievements are being globally recognized today. Yet we lack the self-confidence to see ourselves as a developed nation, self-reliant and self-assured. Isn't this incorrect?
I have a THIRD vision. India must stand up to the world. Because I believe that, unless India stands up to the world, no one will respect us. Only strength respects strength. We must be strong not only as a military power but also as an economic power. Both must go hand-in-hand. My good fortune was to have worked with three great minds. Dr. Vikram Sarabhai of the Dept. of space, Professor Satish Dhawan, who succeeded him and Dr.Brahm Prakash, father of nuclear material. I was lucky to have worked with all three of them closely and consider this the great opportunity of my life.I see four milestones in my career:
Twenty years I spent in ISRO. I was given the opportunity to be the project director for India's first satellite launch vehicle, SLV3. The one that launched Rohini. These years played a very important role in my life of Scientist. After my ISRO years, I joined DRDO and got a chance to be the part of India's guided missile program. It was my second bliss when Agni met its mission requirements in 1994.
The Dept. of Atomic Energy and DRDO had this tremendous partnership in the recent nuclear tests, on May 11 and 13. This was the third bliss. The joy of participating with my team in these nuclear tests and proving to the world that India can make it, that we are no longer a developing nation but one of them. It made me feel very proud as an Indian. The fact that we have now developed for Agni a re-entry structure, for which we have developed this new material. A Very light material called carbon-carbon.
One day an orthopedic surgeon from Nizam Institute of Medical Sciences visited my laboratory. He lifted the material and found it so light that he took me to his hospital and showed me his patients. There were these little girls and boys with heavy metallic calipers weighing over three Kg. each, dragging their feet around.
He said to me: Please remove the pain of my patients. In three weeks, we made these Floor reaction Orthosis 300-gram calipers and took them to the orthopedic center. The children didn't believe their eyes. From dragging around a three kg. load on their legs, they could now move around! Their parents had tears in their eyes. That was my fourth bliss!
Why is the media here so negative? Why are we in India so embarrassed to recognize our own strengths, our achievements? We are such a great nation. We have so many amazing success stories but we refuse to acknowledge them. Why?
We are the first in milk production.
We are number one in Remote sensing satellites.
We are the second largest producer of wheat.
We are the second largest producer of rice.
Look at Dr. Sudarshan, he has transferred the tribal village into a self-sustaining, self driving unit.
There are millions of such achievements but our media is only obsessed in the bad news and failures and disasters.

I was in Tel Aviv once and I was reading the Israeli newspaper. It was the day after a lot of attacks and bombardments and deaths had taken place. The Hamas had struck. But the front page of the newspaper had the picture of a Jewish gentleman who in five years had transformed his desert land into an orchid and a granary.
It was this inspiring picture that everyone woke up to. The gory details of killings, bombardments, deaths, were inside in the newspaper, buried among other news. In India we only read about death, sickness, terrorism, crime. Why are we so NEGATIVE?
Another question: Why are we, as a nation so obsessed with foreign things? We want foreign TVs, we want foreign shirts. We want foreign technology. Why this obsession with everything imported. Do we not realize that self-respect comes with self-reliance? I was in Hyderabad giving this lecture, when a 14 year old girl asked me for my autograph. I asked her what her goal in life is. She replied: I want to live in a developed India. For her, you and I will have to build this developed India. You must proclaim. India is not an under-developed nation; it is a highly developed nation.
Do you have 10 minutes? Allow me to come back with a vengeance. Got 10 minutes for your country? If yes, then read; otherwise, choice is yours.
YOU say that our government is inefficient.
YOU say that our laws are too old.
YOU say that the municipality does not pick up the garbage.
YOU say that the phones don't work, the railways are a joke, the airline is the worst in the world, mails never reach their destination.
YOU say that our country has been fed to the dogs and is the absolute pits.
YOU say, say and say.

What do YOU do about it? Take a person on his way to Singapore. Give him a name - YOURS.
Give him a face - YOURS. YOU walk out of the airport and you are at your International best.
In Singapore you don't throw cigarette butts on the roads or eat in the stores. YOU are as proud of their Underground Links as they are. You pay $5(approx. Rs.60) to drive through Orchard Road (equivalent of Mahim Causeway or Pedder Road) between 5 PM and 8 PM. YOU come back to the parking lot to punch your parking ticket if you have over stayed in a restaurant or a shopping mall irrespective of your status identity. In Singapore you don't say anything, DO YOU? YOU wouldn't dare to eat in public during Ramadan, in Dubai. YOU would not dare to go out without your head covered in Jeddah. YOU would not dare to buy an employee of the telephone exchange in London at 10 pounds (Rs.650) a month to, "see to it that my STD and ISD calls are billed to someone else."
YOU would not dare to speed beyond 55 mph (88 km/h) in Washington and then tell the traffic cop, "Jaanta hai sala main kaun hoon (Do you know who I am?). I am so and so's son. Take your two bucks and get lost." YOU wouldn't chuck an empty coconut shell anywhere other than the garbage pail on the beaches in Australia and New Zealand. Why don't YOU spit Paan on the streets of Tokyo? Why don't YOU use examination jockeys or buy fake certificates in Boston? We are still talking of the same YOU. YOU who can respect and conform to a foreign system in other countries but cannot in your own. You who will throw papers and cigarettes on the road the moment you touch Indian ground. If you can be an involved and appreciative citizen in an alien country, why cannot you be the same here in India?
Once in an interview, the famous Ex-municipal commissioner of Bombay, Mr. Tinaikar, had a point to make. "Rich people's dogs are walked on the streets to leave their affluent droppings all over the place," he said." And then the same people turn around to criticize and blame the authorities for inefficiency and dirty pavements. What do they expect the officers to do? Go down with broom every time their dog feels the pressure in his bowels? In America every dog owner has to clean up after his pet has done the job. Same in Japan. Will the Indian citizen do that here?" He's right. We go to the polls to choose a government and after that forfeit all responsibility. We sit back wanting to be pampered and expect the government to do everything for us whilst our contribution is totally negative. We expect the government to clean up but we are not going to stop chucking garbage all over the place nor are we going to stop to pick up a stray piece of paper and throw it in the bin. We expect the railways to provide clean bathrooms but we are not going to learn the proper use of bathrooms.
We want Indian Airlines and Air India to provide the best of food and toiletries but we are not going to stop pilfering at the least opportunity. This applies even to the staff who is known not to pass on the service to the public. When it comes to burning social issues like those related to women, dowry, girl child and others, we make loud drawing room protestations and continue to do the reverse at home. Our excuse? 'It's the whole system which has to change, how will it matter if I alone forego my sons' rights to a dowry.' 
So who's going to change the system? What does a system consist of? Very conveniently for us it consists of our neighbors, other households, other cities, other communities and the government. But definitely not me and YOU. When it comes to us actually making a positive contribution to the system we lock ourselves along with our families into a safe cocoon and look into the distance at countries far away and wait for a Mr. Clean to come along & work miracles for us with a majestic sweep of his hand or we leave the country and run away. Like lazy cowards hounded by our fears we run to America to bask in their glory and praise their system. When New York becomes insecure we run to England. When England experiences unemployment, we take the next flight out to the Gulf. When the Gulf is war struck, we demand to be rescued and brought home by the Indian government. 
Everybody is out to abuse and rape the country. Nobody thinks of feeding the system. Our conscience is mortgaged to money.
Dear Indians,
The article is highly thought inductive, calls for a great deal of introspection and pricks one's conscience too....
I am echoing J. F. Kennedy's words to his fellow Americans to relate to Indians.....
Lets do what India needs from us.
Thank you
Abdul Kalaam

Sunday, June 19, 2011

How to change the localhost name in ubuntu (Linux)?

apache server should be installed.

    Open the Terminal
    type this command and press enter

    sudo gedit /etc/hosts

hosts will be opened in notepad.
you can find this line :    localhost.localdomain    localhost

Just change the localhost to www.facebook.com
Restart the apache server.
Don't you know how to restart the server. nothing to worry just enter the following command in terminal:

    sudo /etc/init.d/apache2 restart

and thats it!!
Now if you put www.facebook.com in your browser then you will get the default localhost index.html on your browser....

Wednesday, June 15, 2011

Recover disappeared Application Menu or panel in ubuntu

This tutorial will explain how to recover disappeared Application Menu, Places Menu and System Menu in ubuntu

Procedure to follow

1) First you need to Boot the system upto Login Window and now Press Ctrl+Alt+F1

2) Now You will get a Text based login screen use your username and password to login

3) run the following Command from your terminal
   sudo gconftool – -recursive-unset /apps/panel

   sudo rm -rf .gnome .gnome2 .gconf .gconfd

Now Press Ctrl+Alt+F7 you get your normal GUI login window.
{if you dnt get ,than restart your system  }

Howto: Restore All Installed packages in Ubuntu

Ever forget what you had installed and find yourself at a fresh ubuntu install thinking to yourself... Damn now I gotta open up synaptic and search for everything I had... Well fortunately you dont need to do that. With this easy howto you can also restore all your packages that were installed by simply creating a package list and uninstalling every application installed after the list was made.

Lets get started shall we?

The following command creates a list of all the installed packages at the present time:
sudo dpkg --get-selections > /etc/package.selections

Now we created our package list and we can copy this list to a new ubuntu computer and install the same packages in the list to the new machine or, restore the packages to the time you created the package list:

sudo dpkg --set-selections < /etc/package.selections && apt-get dselect-upgrade

Restore Ubuntu

Did you screw up your Ubuntu install? No need to download all the packages or get our your Ubuntu CD for a new installation. A single command can help you reinstall Ubuntu and reinstall all the packages from core and reconfigure them.

To reinstall or restore Ubuntu to a factory install from the command line, run the following command:

   1: sudo dpkg-reconfigure -phigh -a

To run minor restores and dependency issues, you can run the command:

   1: sudo apt-get install -f

You don’t have permission to access http://localhost/ files or folders on this server in Ubuntu (Linux)

If you are getting the following error while browsing any local website in Ubuntu, on apachehttp server like:
You don’t have permission to access http://localhost on this server files or folders
then you may not be having the full rights to access that folder or file(s). On the other end, you may be accessing the folders and files through the File Browser (while using gnome-terminal command sudo nautilus etc), but while browsing them through any web browser like Firefox etc., you may be getting the permissions error as mentioned:
403 Forbidden
You don’t have permission to access http://localhost on this server (or any of localhost’s subdirectory)

Apache/2.2.11 (Ubuntu) Server at localhost Port 80

For the solution, simply do the following method to grant yourself and all of the users, including admin, groups and other users, the read, write and execute rights, to stop getting such errors:
Goto Applications -> Accessories -> Terminal
and write the following code:
chmod a+rwx foldername or filename
with full path, for example:

Granting Rights on Folder:

If you are getting such error on the directory:
then the command should be:
chmod a+rwx /var/www/webtechquery/
chmod a+rwx /var/www/webtechquery/*

Granting Rights on File:

If you want to grant full rights on files e.g. abc.php, then the command should be:
chmod a+rwx /var/www/webtechquery/abc.php
If you want the rights to be granted to only the owner, group or specific user(s), then use the following commands:

For Owner:

chmod o+rwx /var/www/webtechquery/abc.php

For Group:

chmod g+rwx /var/www/webtechquery/abc.php

For User:

chmod u+rwx /var/www/webtechquery/abc.php
o = owner
u = user
g = group

r = read
w = write
x = execute

Tuesday, June 14, 2011

Samba clients

The Samba suite of applications are not just for server use, they can also enable a Linux workstation the ability to mount a shared Windows resource as part of its own filesystem. The smbclient application requires the use of a valid username and password that has been configured on the Microsoft server/workstation that it will be connecting too, unless the guest account has been enabled on the target system.

To obtain a complete list of all the workstations available on the local network, type the "findsmb" command at the prompt.

[bash]# findsmb
---------------------------------------------------------------------     GALAXY        *[MYGROUP] [Unix] [Samba 3.0.10-2]   WINBOX1        [WINBOX1] [Windows 5.1] [Windows 2000 LAN Manager]   WINBOX2        [WINBOX2] [Windows 5.1] [Windows 2000 LAN Manager]   WINBOX3        [WINBOX3] [Windows 5.1] [Windows 2000 LAN Manager]   WINBOX4        [WINBOX4] [Windows 5.1] [Windows 2000 LAN Manager]

The smbclient can be used to obtain a detailed list of shared resources from a specified host on the local network. In this example we are asking for a list of resources from the Samba server called "galaxy". Because the server is not configured with an active guest account, we need to pass a valid username (-U) in the process, in this case alice.

[bash]# smbclient -U alice -L galaxy
Domain=[GALAXY] OS=[Unix] Server=[Samba 3.0.10-2]

        Sharename       Type      Comment
        ---------       ----      -------
        Shared          Disk      Global Share - All Users
        SmallGroup      Disk      Small Share - Few Users
        Financial       Disk      RESTRICTED - Financial Cell
        FTP-Server      Disk      READ ONLY - Corp FTP Server
        IPC$            IPC       IPC Service (Samba Server)
        ADMIN$          IPC       IPC Service (Samba Server)
        bubblejet       Printer   HP PhotoSmart 7200 Series
        laser           Printer   Brother HL-1430 Laser Printer
        alice           Disk      Home Directory

Domain=[GALAXY] OS=[Unix] Server=[Samba 3.0.10-2]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        MYGROUP              GALAXY

The following example is similar to above, however we are obtaining a list from the Microsoft client called "winbox1" which is a Windows XP desktop. A valid username (-U) is also used in the remote request.

[bash]# smbclient -U alice -L winbox1
Domain=[WINBOX1] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename       Type      Comment
        ---------       ----      -------
        E$              Disk      Default share
        IPC$            IPC       Remote IPC
        D$              Disk      Default share
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        Shared          Disk      Full Share for ALL !!!

Domain=[WINBOX1] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------

CPU Architecture Information On Ubuntu(Linux)

How do I find out my CPU architecture information under Linux operating systems?

You can use /proc/cpuinfo file or use the lscpu command to get info about CPU architecture. It will display information like:
  • Number of CPUs
  • Threads
  • Cores
  • Sockets
  • NUMA nodes
  • Information about CPU caches,
  • CPU family, model and stepping.
  • in human-readable format. Alternatively, it can print out in parsable
  • format including how different caches are shared by different CPUs,
  • which can also be fed to other programs.
Open a terminal and type the following command:
$ less /proc/cpuinfo


processor        : 0
vendor_id        : GenuineIntel
cpu family       : 6
model              : 15
model name     : Intel(R) Core(TM)2 Duo CPU     T5800  @ 2.00GHz
stepping           : 13
cpu MHz          : 2000.000
cache size        : 2048 KB
physical id       : 0
siblings            : 2
core id             : 0
cpu cores        : 2
apicid              : 0
initial apicid    : 0
fdiv_bug          : no
hlt_bug            : no
f00f_bug          : no
coma_bug        : no
fpu                   : yes
fpu_exception   : yes
cpuid level        : 10
wp                   : yes
flags               : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_
perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts
bogomips        : 3989.62
clflush size      : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 Duo CPU     T5800  @ 2.00GHz
stepping        : 13
cpu MHz         : 2000.000
cache size      : 2048 KB
physical id     : 0


$ lscpu
Sample outputs:
Architecture:              i686
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                       2
Thread(s) per core:    1
Core(s) per socket:    2
CPU socket(s):           1
Vendor ID:                 GenuineIntel
CPU family:                6
Model:                       15
Stepping:                   13
CPU MHz:                  800.000
L1d cache:                32K
L1i cache:                 32K
L2 cache:              2048K

Friday, June 10, 2011

College Days

From last few months i was thinking to write about my college life ,but due to my busy schedule i was not able to .so i am starting from today.This is a brief introduction of what i am going to write...
hummm...let me think ,let not.I am gonna share each and every moment of my college life,which i do remember,may be real or non-real ...
love,revenge,race-around condition,fears,last night study,fight for 40 marks (:D),stalking girls...etc
these are some colors which i have in my palette to throw on blogger canvas.
so let me first introduced to you some of the characters of the story..or you can say my best buddy's in B.tech

umesh Kumar (bhaiya ): yeah he is our bhaiya although he remains confuse all the time hahaha. He is the one with whom i shared my room for the first time. He is just ...wait a second i need some words to describe him ...let me googled it out :D
He is a very simple with high thinking ....hahaha thats apogee of lying ...He is simple but with a twisted brain,i am still in process to understand its structure from last 3 years.
one most important think he got is too many girl friends ,more then i have :-(
well the most special thing about his gf's is that they only call during his paper ...hahaha ...they do screw his paper every semester.
well he is really a sweet person and a one of mine best friend.

Rohitkumar gautam:(a.k.a Fauji):Well i should have mention about him first in this list because he is my second room-mate from last 3 year,and also the one with whom i felt compatible.So you should be thinking why we call him fauji ?? because is a under-officer in NCC,and also a patriot citizen.
He is a sincere person.He knows almost everything and explains it in detail....that description can even kill you if you are not a sound listener ... :D
well nagpur rocks ...yeah he is from nagpur ,he always exaggerate about nagpur but also dnt step back in showing true colors of it.
Give him a task and he will finish it with perfection but the condition is that there should be no time boundation..:D
He is also a gate qualified ... i mean we both are :LOL
but he is also microsoft & Cisco certified :-( i am not :P
so whose next pratyush Maurya(chiraya) ....i dnt have time to write about him ,this one line describes him :LOL
A very studious student and also used to be our Finance Minister .He is the sweetest guy i have ever met.He is also a silent lover :D
next 1 is Abhijeet gupta(CHick-Na)
yeah he is very cute and a whitish boy...He lives in his fairy world where fairy never get landed.All HOt girls out their he is totally available
if your face color code is #FFFFFF :LOL

now What about me(VisHaL) ...??
check that out in next edition if i got time to write it :hhahaha