Sunday, September 7, 2008

configuring Evolution mail to work with gmail/yahoo/*

Start the evolution mail or thunderbird,for that matter.. run the wizard that adds new account,the options for use with…

1. Yahoo mail are as follows, step wise.

step 1 : specify user login.

In the email address tab type @yahoo.co.in(or .com)

step 2 : Receiving Mail options

Server type : POP
Server : pop.mail.yahoo.com
username : someone
Use secure conn.: No encryption

step 3 : Sending mail options

Server type : SMTP
Server : smtp.mail.yahoo.com
authentication : PLAIN

2. GMail

step 1 : almost same as above setup.

For GMail every thing is same except it should be SSL encryption in the palces of ‘No encryption’ and ‘PLAIN’.

step 2 : Receiving mail options

server for receiving mail is pop.gmail.com

step 3 : Sending mail options

server for sending mail is smtp.gmail.com

step 4 : Enable POP in gmail setting

Most importantly,you SHOULD enable the POP in gmail settings.
Goto GMail/settings/Forwarding and POP and enable POP.

3. IIIT Students Mail (Intranet):

everything is same as yahoo mail config,except that both the servers are ’students.iiit.ac.in’

grub errors

if you somehow delete the linux partition from windows, then it is very likely to get grub error. That means when we boot it looks like grub>

To recover windows ntloader you need only a winxp cd.
Boot your pc with cd and when blue screen appears, press 'r' for a recover console and then type 'fixmbr' in the console. Take the cd out and restart your system. you did it

If you dont have a cd or if you want to boot winxp for once:
Type the following commands at the grub command prompt
grub> rootnoverify (hd0,0) #(hd0,0) means your hard disk id in which you installed winxp
it may be (hd0,1); it depends
grub> makeactive
grub> chainloader +1
grub> boot

note: But in this method you need to type all the commands everytime you want to boot winxp

Suppose you installed windows after linux, you wont see linux option in the boot menu and starts windows automatically. Thats because windows will erase mbr.
To recover that you need first cd or rescue cd of linux. Boot from cd and type this at boot prompt:
boot: linux rescue
This will go some options which then leaves to a shell prompt. Type these commands at that prompt:
prompt: chroot /mnt/sysimage
prompt: grub-install /dev/hda #hda refers to your hard disk naming. It may be hdb or sda
prompt: exit
remove the cd and reboot it . you did it
Note:
we cant boot windows which is installed in logical drive and linux in primary drive

Thursday, May 15, 2008

installing winxp using pendrive

requirements:
  • pen drive with atleast 1GB
  • winxp installation disk
  • access to a PC with working CD-ROM drive and winrar software
  • this file solution.rar or solution.rar (both are same but links are different).
procedure:

Put your pendrive into the working PC
Download the file and unpack it on drive C
Go to the folder C:\Dos and run HpUSBformat.exe file
it will ask to format the pen drive put options like in the image below
now you have a bootable pendrive
copy all files from C:\Dos to pendrive
put winxp installation disk into CD-ROM and copy all files from CD to pendrive
now boot your system(in which you want to install winxp) with pendrive
use fdisk to see your drives and format or create partitions (if you have partitions formated already you dont need this step)
using nc commander, copy all files from pendrive to partitioned drive( type nc enter and then F5 to copy files it will ask for path give the path for more shortcuts see this )
now you have system with DOS bootable
restart your system without pendrive
type cd i386 enter and then winnt enter
it will install winxp as if we put a cd in CD-ROM (remember don't install winxp in the same partition as in we copy these files because while installing winxp it will format the partition and we will loose all the installation files)
Note:
1. we need 2 empty partitions by this method
2. your system should have the option "boot on pendrive"

Sunday, March 16, 2008

some fun with terminals

Some fun with terminals
There are two tools that can be usefull when working in console :
- script
- screen

1. script

script is a nice program that let you monitor in one or
more terminals what you type in another terminal.

Example:
- Open two X terminals in your X session or use the Linux
ttys (ctrl + alt + F1-6)

- On one terminal, type :
Code:
cd ~
mkfifo output
script -f output
- On another terminal (or more), type :
Code:
cd ~
cat output

- Then return to the first terminal and execute any
command you like (ls, cd, ping...)

The output should be appear on every terminals where
you cat output fifo.

- Exit script session by typing exit command in the first
terminal (the one which you started script command)

man script for more infos


2. screen

screen is a terminal screen manager (like a window manager
but for consoles)

Example:
- In a terminal, type : screen
screen is now started, it has opened one screen, you should
see the prompt of your shell, waiting for commands

- Name this screen with typing : [ctrl + a], then A (note that
A is uppercase, so you may need to type:
[ctrl +a], then [shift +a]
Erase the default title using backspace key and name it whith
any name you want, say "Shell 1", press key.

- Create a new screen with : [ctrl + a] [ctrl + c], name it
([ctrl + a], [shift + a]), say "Shell 2"

- To switch between these 2 screens, type [ctrl + a], then ["]
(double quote key), you should see a list of all your screens
To enter on one, just select it with the top/bottom arrow keys
and press

- To exit screen, just type exit in all your opened screens

Tips for ssh session :
Say you run a command that take long time to complete
(say updatedb or a system upgrade), you can detach your
screen, exit ssh session, let the command run on the
remote host and return to the screen later :

- ssh to your remote host, run screen, run your command,
then type : [ctrl + a], [shift + d], [shift + d]

You now are now logout of your ssh session, screen in
remote host is detached so it keep running your command

To return to your screen, ssh into your remote host, then
use : screen -r

You are now in the screen showing output of the command
you issued before.

man screen for more infos

create mysql user and give permissions to access

$cmd:create user username


$cmd:grant all privileges on *.* to 'username'@'ipadress' identified by
'password' with grant option;

'*':the 1st '*' represents which databases you want to acces

'username': for which username you want to give permissions
'ipaddress': from which ipaddress you want to access, you can put localhost for local systema and '%' for all the systems in the network.(you can give both one at each time)

'password': for which password you want access

apache configuration in fc5

apache cofiguration in fc5 to see html scripts on your own system

Open the file httpd.conf (generally in /etc/httpd/conf/httpd.conf or
locate it by running locate httpd.conf).

-->Find this line 'UserDir public_html'(generally around 355-365 line) and
uncomment it

-->Find 'UserDir Disable'(a few lines above the previous one) and comment
it.

-->Find 'ScriptAlias /cgi-bin/ "/var/www/cgi-bin" and uncomment it if it
is commented.(around 555-565 line)

-->In the code segment that begins like this ...(immeadiatley below the
above one)



change the line 'Options None' to 'Options ExecCGI'

-->Find the line 'AddHandler cgi-script .cgi' and uncomment it.

-->And include this segment of code to enable
execution of cgi scripts in ur /home//public_html/cgi-bin (for
that matter any directory of the path you mention).



AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all






AND MOST IMPORTANTLY.. Dont forget to start your http server,as simple as
that..

root@localhost#service httpd start

now goto http:///~/cgi-bin

or http:///cgi-bin (the default)

mysql backup and restoring databases

mysql dump
from database to file:

$cmd:mysqldump -u username -p databasename > filename.sql

it will ask for password

from file to database:

$cmd:mysql - u username -p databasename < filename.sql



More detailed backup:


Tacking full backup of all the tables and data also:

$cmd:mysqldump -u username -p databasename > filename.sql

Taking the backup of table structures only:

$cmd:mysqldump -u username -p --no-data databasename > filename.sql

Taking the backup data only:

$cmd:mysqldump -u username -p --no-create-info databasename > filename.sql

But the restoring is same for any of these backup methods

log into another linux system with using password only once

$cmd:ssh-keygen -t rsa
press enter it will ask for customization
$cmd:scp ~/.ssh/id_rsa.pub username@ipaddress:.ssh/authorized_keys2

it will ask for password enter password
eg:
save passwd for 200 or 205:

$cmd:scp ~/.ssh/id_rsa.pub anjaneyavsk@192.168.36.205:.ssh/authorized_keys2