Friday, August 29, 2008

sendmail problem on RHEL Linux

1)
mail command wasn't sending the mail with following error:

[root@host1]# mail -v -s test tbabar
test
.
Cc:
fprintf.c:50: SM_REQUIRE((fp) != NULL && (fp)->sm_magic == (SmFileMagic)) failed


From the /var/log/maillog it was found that:
sendmail[8698]: m7TB22jG008698: SYSERR(root): queueup: cannot create queue file ./qfm7TB22jG008698, euid=51, fd=-1, fp=0x0: No space
left on device


Made some free space on /var, after which mail started working.

2)
mail command wasn't showing any error but also wasn't sending mail.
/var/log/maillog was showing:

sendmail[8656]: m7TEbgoL008656: SYSERR(root): collect: Cannot write ./dfm7TEbgoL008656 (bfcommit, uid=0, gid=51): No such file or dir
ectory


It was found that the problem was due to 'sendmail' binary permission problem, removed 'write' permission of owner & it started working. This is bit strange but....

#which sendmail
/usr/sbin/sendmail
# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Aug 29 14:12 /usr/sbin/sendmail -> /etc/alternatives/mta
# ls -l /etc/alternatives/mta
lrwxrwxrwx 1 root root 27 Aug 29 14:25 /etc/alternatives/mta -> /usr/sbin/sendmail.sendmail
# ls -l /usr/sbin/sendmail.sendmail
-r-xr-sr-x 1 root smmsp 746328 Jan 22 2007 /usr/sbin/sendmail.sendmail

Note: The permissions required for 'sendmail' files can be found in /usr/share/doc/sendmail/SECURITY file.

Unable to 'su' on RHEL linux

A root user wasn't able to su to any other user. After executing su command neither it will switch to other user nor shell will change.

It was found that this was because corrupted 'su' binary.

[root@lxdevtst ~]# which su
/bin/su
[root@lxdevtst ~]# ls -l /bin/su
-rwsr-xr-x 1 root root 0 Jul 18 11:49 /bin/su

See above, the file size is zero. To resolve this, forcefully installed the 'coreutils' rpm, which provides this binary.

Tuesday, July 8, 2008

How to reset MySQL root password?

If you forgot root password for your MySQL server, you can follow the steps below to reset it.

1. Login to the server as root and stop MySQL service.

# /etc/init.d/mysqld stop

2. Start mysqld_safe service.

# mysqld_safe –skip-grant-tables &

3. Login to MySQL server now. It won’t ask you for a password.

# mysql -u root

4. Set up a new MySQL root user password:

mysql> use mysql;

mysql> update user set password=PASSWORD(”NEW-ROOT-PASSWORD”) where User=’root‘;

mysql> flush privileges;

mysql> quit

5. Restart your MySQL service.

# /etc/init.d/mysqld restart

6. Try to login using new password. It should work fine.

# mysql -u root -p

That’s it !!!

Saturday, May 31, 2008

स्वामी ....

ऐलतीरावर सुख। पैलतीरीं नांदे दुःख ।

मधें वाहतें जीवन । हेंच संसाराचे रूप ।।

ताटातुटीसाठीं का रे । देवा खेळ हा मांडीला ।।

देवपणा सांग त्यांने । तुझा खरा काय झाला ?

विघ्नहर्त्या विनायका । तुला पार्वतीची आण ।

रमा-माधवा संभाळ तुझे आठवीण गुण ।।

रणजीत देसाई यांच्या 'स्वामी' या कादंबरीतून ...

स्वामी ....

आज आकाशाचा डोळा । कशानं ग ओला झाला ।

देव राहिला राउळीं । भाव वनवासी झाला ॥

ध्रुव कसा ग ढळला । चंदनाचा दाह झाला ॥

आज सती जानाकीचा । त्याग रामराये केला ॥

क्षितिजाला दुभगून । रथ जानाकीचा गेला ।

सुकलेल्या आसवांत । राजा आयोध्याचा न्हाला ॥

सदाशिवभाऊ यांच्या पत्नी पार्वतीबाई यांचे हे विरह गीत, रणजीत देसाई यांच्या 'स्वामी' या कादंबरीतले आहे....

Friday, May 9, 2008

भावना

''भावना व्यक्त करण्यासाठी शब्दांचीच गरज नसते.........''
कधी कधी ङोळेही खुप काही बोलुन जातात......"
"अनावर होतात जेव्हा त्या भावना.....
मूके अश्रु ही बोल्के होतात,शब्द दूर निघून जातात...."

राधा ही बावरी...

राधा ही बावरी हरीची
रंगात रंग तो शामरंग पाहण्या नजर भिरभिरते

ऐकून तान विसरून भान ही वाट कुणाची बघते
त्या सप्तसुरांच्या लाटेवरूनी साद ऐकूनि होई
राधा ही बावरी हरीची राधा ही बावरी
राधा ही बावरी हरीची राधा ही बावरी llधृ.ll

हिरव्या हिरव्या झाडांची पिवळी पाने झुलताना
चिंब चिंब देहावरूनि श्रावणधारा झरताना
हा दरवळणारा गंध मातीचा मनास बिलगून जाई
हा उनाड वारा गूज प्रीतीचे गाणे सांगून जाई
त्या सप्तसुरांच्या लाटेवरूनी साद ऐकूनि होई
राधा ही बावरी हरीची राधा ही बावरी
राधा ही बावरी हरीची राधा ही बावरी ll१ll

आज इथे या तरुतळी सूर वेणूचे खुणावती
तुज सामोरी जाताना उगा पाऊले घुटमळति
हे स्वप्न असे की सत्य म्हणावे राधा हरपून जाई
हा चंद्र-चांदणे ढगाआडुनि प्रेम तयांचे पाही
त्या सप्तसुरांच्या लाटेवरूनी साद ऐकूनि होई
राधा ही बावरी हरीची राधा ही बावरी
राधा ही बावरी हरीची राधा ही बावरी ll२ll

बोलताही येत नाही...

बोलताही येत नाही की लपविताही येत नाही
तुझ्यावर किती प्रेम आहे हे सांगताही येत नाही

पहिले जेव्हा तुला फक्त तुलाच बघत राहिलो
फक्त तुलाच पहावे असेच दिनक्रम करत राहिलो
खरच तुझ्या नादाने मी स्वता लाच हरवत राहिलो
काय करू प्रेमाचा ताज महल् ला सजवीताही येत नाही
बोलताही येत नाही की लपविताही येत नाही

आज नाहीतर उद्या बोलेन दिवस फक्त जात आहे
कधी येईल ती वेळ त्याचीच वाट पाहत आहे
यशस्वी नक्की होऊ हेच मनाला समजवात आहे
खरच आता तुझ्याशिवाय मला जगताही येत नाही
बोलताही येत नाही की लपविताही येत नाही

दिवस रात्र फक्त तुझाच विचार येत च आहे.
माझी पावले तुझ्याच मागे जातच आहे
हृदयात या माझ्या प्रेमाचे झरे वाहातच आहे
काय करू माझी प्रेमाची धार तुझ्या हृदयात वाहताही येत नाही
बोलताही येत नाही की लपविताही येत नाही

बोलताही येत नाही की लपविताही येत नाही
तुझ्यावर किती प्रेम आहे हे सांगताही येत नाही....

Wednesday, April 30, 2008

कळतयं पण वळत नाही

ठरवलं होत खुप काही, पण सारंच तसं घडलं नाही
विधिलिखित असतं सारं, मीही याला अपवाद नाही
सुर्याच्या कक्षेबाहेर पृथ्विलाही जाता येत नाही
भल्यासाठीच होते सारे, कळतयं पण वळत नाही...........

Friday, April 25, 2008

ORACLE Authentication....

As a DBA we must have used sqlplus “/as sysdba” to connect to database, at least hundred times a day. Never bothered about the password to provide !!!

This is because we were using OS level authentication. We can change the configuration and make Oracle to ask for the password. Well, “/as sysdba” works fine if we are connecting to the host where the database is actually installed.

For example I have installed a database as oracle01 user (which belongs to DBA group) on one of my host called “host1″. I telnet to host1 as oracle01 user and provide the password to login. Once I successfully login to the host, there ends the authentication part. Not for administering the database all I have to do is to use our famous command to connect to database - “sqlplus /as sysdba”.

The reason above thing work is because I was using Operating System level authentication. If I try to connect to same database as sysdba from some other host, I wont be able to connect. Because the authentication is done based on host login password. Since I haven’t logged into host, authentication will fail and connect as sysdba will fail. So for OS authentication its mandatory that you are always logged into the host where the oracle is installed (oracle database resides).

Authentication Type

There are 2 types of authentication:

1. OS (Operating System) Authentication
2. Password File Authentication


And yes the above one that i explained is OS level authentication. Lets see what is password file authentication.

Password File Authentication

In case of password file authentication, we create a password file for our database. ORAPWD is the utility for creating a password file. This utility is provided by oracle and comes when you install database. This binary is present in ORACLE_HOME/bin directory. Below is the usage for the same.

ORAPWD FILE=(file_name) password=(password) ENTRIES=(Entries)

Where file_name is the name and location of the password file. Usually we create password with name as ora(SID).pwd in ORACLE_HOME/dbs directory. So value for file_name becomes $ORACLE_HOME/dbs/ora(sid).pwd

password - is the password you want to set for password file. Remember that this will become the password for sys user as well. Meaning that when you are connecting as sys user, you need to provide this password. (oracle will prompt for password in case of password file authentication).

Entries - This is the number of entries that password file can have. Be careful while providing this value as once you set this value, you cannot change it. You have to delete password file and recreate it, but its risky.

Example:

$orapwd FILE=/u01/oracle/product/9.2.0/dbs/oraorcl.pwd PASSWORD=welcome1 ENTRIES=10

This will create a password file oraorcl.pwd in /u01/oracle/product/9.2.0/dbs directory.

After creating password file, how your database will know that you have created password file and you are supposed to use the same. This is done by INIT.ORA parameter REMOTE_LOGIN_PASSWORDFILE. This
parameter can have 3 values (none - OS level authentication, shared/exclusive - password file authentication). So for using password file, you need to set the value of this parameter to either shared or exclusive.

What is the difference between SHARED and EXCLUSIVE?

If we set the value of REMOTE_LOGIN_PASSWORDFILE to SHARED in INIT.ORA file, then following is true.

* This file can be used for more then one database (shared file)
* One SYS user will be recognized by database. Meaning that you can login to database using SYS and no other user holding sysdba responsibility. However you can connect to database using SYSTEM or any other user but not the once holding sysdba responsibility.

If we set the value of REMOTE_LOGIN_PASSWORDFILE to EXCLUSIVE in INIT.ORA file, then following is true.

* This file will be specific to one database only. Other database cannot use this file.
* Any user enter having sysdba responsibility, which is present in password file can be connected to database as sysdba from remote server.

So when using password file authentication remember to set the value of REMOTE_LOGIN_PASSWORDFILE to SHARED or EXCLUSIVE in INIT.ORA file. Also when using OS level authentication set the value if this parameter to NONE

Tuesday, March 18, 2008

Want To Download More than Two Files at a Time?

Now a days we are very much dependant on Internt. There are lot of useful stuff on net we download on our local collectin. Sometimes there would so many files we we would be downloading from a site, but internet browsers(IE/FireFox)doesn't allow to download more that 2 files at a time, which frustates while downloading multiple files. You can overcome this limit as mentioned below.

1) FireFox
The process of changing this limitation is pretty simple. For those of you who don't know, Firefox has a special "link" you can use to change settings which are not exposed within the User Interface. To go to this link simply type "about:config" in your location bar and press enter.

In the resulting list find the option named:
network.http.max-persistent-connections-per-server

This is set to 2 by default. You can set this to be whatever you want. I set mine to 10.

Now, you can download more than just two files at a time!

2) Internet Explorer

For setting internet explorer use the following link :
http://support.microsoft.com/?kbid=282402

Thursday, February 21, 2008

Things your CV should NOT have

Your CV is your marketing brochure through which you try to sell a commodity, ie your skills to the potential buyer ie the prospective employer. The sole purpose of your CV is to fetch you an interview call. Nothing more, nothing less.

However, creating a CV isn't as simple as just using flowery language and pretty fonts. There are certain things that put recruiters off and if you want to make a good impression, make sure you do not commit these mistakes in what is arguably the most valuable document of your job hunt.

While the rules listed are well-founded, they are not carved in stone. At times you will need to break the rules. If you want to add these things knowingly and purposefully to your CV we advise you to do that.

The points mentioned here are not listed in the order of priority; instead they are listed in the sequence in which they usually appear on a CV.

~ Colorful or glossy paper and flashy fonts
Your CV is a formal, official document. Keep it simple.

~ Resume or CV at the top
Many people tend to add headings to their CV. The usual are CV, Curriculum Vitae and Resume. Do not do this.

~ Photographs until asked
Do not add your photo to the CV until you have been asked for it. Photographs are required only for certain types of positions like models, actors etc.

~ Usage of 'I', 'My', 'He', 'She'
Do not use these in your CV. Many candidates write, 'I worked as Team Leader for XYZ Company' or 'He was awarded Best Employee for the year 2007'. Instead use bullet points to list out your qualifications/ experience like: Team leader for XYZ Company from 2006-2007.

~ Spelling mistakes and grammatical errors
Proofread your CV until you are confident that it doesn't have any spelling mistakes or grammatical errors. These are big put-offs for the recruiters. Moreover, sometimes these mistakes might land you in an embarrassing situation.

A candidate who submitted his CV without proofreading it committed the mistake of wrongly spelling 'ask' as 'ass'. Now you can imagine the type of embarrassment he must have faced during the interview, when the interviewer pointed it out. These mistakes tend to convey a lazy and careless attitude to the interviewer.

~ Lies about your candidature
Do not lie about your past jobs or qualifications or anything which might have an impact on the job. You may be able to secure a job with these lies today but tomorrow you may lose it as well.

~ Abbreviations or jargon that is difficult to understand
People screening your resume usually belong to the HR department. If they do not understand what the abbreviations and jargon mean, they will simply dump your CV in the trash can. Avoid over-using such terms as far as possible.

~ Reasons for leaving last job
Leave these reasons to be discussed during the personal interview. For example, some candidates write: Reason for leaving the last job: Made redundant. Avoid making such statements in your CV, they add no value. Besides, if you do get an interview call, chances are the interviewer will address the issue.

~ Past failures or health problems
Mentioning these immediately slash your chances of getting an interview call.

For instance, you have a gap in your employment because you started your own business which did not do well. Some candidates might write -- Reason for gap in employment: Started own business which failed. Do not do this type of injustice with your job hunt at this stage of writing the CV.

~ Current or expected salary
Leave it to be discussed while negotiating the salary.

~ Irrelevant details
Leave out the details like marital status, sex, passport number, number of kids, age of kids. These are usually irrelevant for most interviewers but at times could be used as a basis for discrimination.

~ References
Do not include them until asked. In fact, it is not even required to mention the line 'Reference available on request'. If the recruiter requires a reference, he/she will ask you to bring it along for the interview.

Now that you have run through the list, take a fresh look at your CV and prune away unnecessary details and unaffordable blunders that could have cost you your dream job.

I have baught a new Kodak M883 digital camera..!

It was planned to buy a digicam since last one year but wasn't happening. There was concerns of which model to buy, where to buy, price is more and so on.... I was watching only Sony,Cannon & Nikkon models, never thought of buying a Kodak. But..things happen as they have to, and finally I bought the KODAK only....What happened was, we went to Big Bazar to buy a TV and there was a offer on Kodak camera saying buy one 14K camera & get 13K camera free. Firstly I wasn't ready to get Kodak but my mate malaya said he would take one and we should buy it. And thats it we got Kodak M883 and M873 both 8MP/3X cameras for 14K.. The quality is not very good but it is ok, and I would not recommend the Kodak..


(snap taken from the Kodak M883 & some what edited with Kodak EasyShare software)

Friday, February 8, 2008

iSCSI and Qlogic tips....

env: RHEL4 U5
Equallogic SAN
Qlogic HBA 4050/4060

To add/remove/manage LUNS on Qlogic HBA the iscli command line tool is used. When you remove the LUNs using iscli utility, the disks related to these LUNs will be removed from the system. When you add new LUNs, you would need to reset the HBA to get the disks added to system. Sometimes you may not get the disks added even you reset the HBA with iscli utility, you might reboot the server.

To avoid the system reboot and get the disks added to system you can do the following:

1. Unload the qla4xxx module, which is used as driver for HBA.
# rmmod qla4xxx

2. Reload the qla4xxx module.
# modprobe qla4xxx

Note: Before doing this you should unmount all the mounted SAN filesystems cleanly. If you haven't unmounted the filesystems or filesystem is not unmounted cleanly, you will get error "qla4xxxx: module in use", when you try to unload the module.

# When you have multipathing configured, you would receive error "qla4xxxx: module in use", even you unmount the filesystems cleanly. This is because the multipath device mapper doesn't release the disk devices. In this case you need to flush the multipath configuration and then unload/load the qla4xxx module.
To flush the multipath maps use command below:
# multipath -f [map name]

Hot plugging of hard disk in Linux...

How to add/remove a Hot Plug Disk avoiding a reboot

1.#cat /proc/scsi/scsi
This will list all the SCSI devices known to the kernel.

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: SEAGATE Model: ST39204LC Rev: 0005
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: SEAGATE Model: ST3146807LC Rev: 0007
Type: Direct-Access ANSI SCSI revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: DELL Model: 1x4 U2W SCSI BP Rev: 1.16
Type: Processor ANSI SCSI revision: 02

2. In order to add a new hot plugged disk to the list of above known devices, run:

# echo scsi add-single-device 1 0 3 2 > /proc/scsi/scsi
This will cause the host scsi1 to scan on CHANNEL 0 for device ID 3 LUN 2

3. fdisk -l should list the device

4. In order to remove a known device

#echo scsi remove-single-device 0 0 6 0 > /proc/scsi/scsi

This will remove the disk from the list on scsi 0 CHANNEL 0 for device ID 6 LUN 0