Tuesday, 26 August 2014

Sample mail script to attach files to auto generated mails

#!/usr/bin/ksh
df -h > /scripts/df.txt
export MAILTO="chittibabu.miriyala@gmail.com"
export CONTENT="/scripts/df.txt"
export SUBJECT="sending files example "
(
 echo "Subject: $SUBJECT"
 echo "MIME-Version: 1.0"
 echo "Content-Type: text/plain"
 echo "Content-Disposition:attachment; filename=df_output.txt"
 cat $CONTENT
) | sendmail -f yyy@gmail.com $MAILTO

Smart way to impliment File system list autogenerated script

#!/bin/bash
MAILTO=chittibabu.miriyala@gmail.com
mail $MAILTO <<EOF
From: $MAILTO
To: $MAILADD
Subject:"mail testing for list of directores"
`cd /oracle;ls -l`
`df -h`
EOF

Password aging Auto generated mail

#!/usr/bin/bash
#########################################
######### Chittibabu Generated SCRIPT########
######### PASSWD AGING CHECK##############
##VERSION=1.0############################
##DESIGN&IMPLEMENTED:CHITTIBABU MIRIYALA#
##TESED BY :MAHESH KUMAR#################
#########################################
Node=`uname -n`
echo "From:chittibabu.miriyala@gmail.com" >"/tmp/output1"
echo "To:chittibabu.miriyala@gmail.com">>"/tmp/output1"
#Reply-To:chittibabu.miriyala@gmail.com
echo "Subject:PASSWD AGING : $Node">>"/tmp/output1"
echo "Content-type: text/html">>"/tmp/output1"
echo "<html>">>"/tmp/output1"
echo "<body>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1> $Node</h1> </td></tr>">>"/tmp/output1"
NDAYS=`/usr/bin/perl -e 'printf("%d\n", time / (3600 * 24))'`
for i in `cat /etc/passwd|cut -d ":" -f 1|egrep -v "uucp|daemon|bin|sys|adm|lp|dladm|netadm|netcfg|smmsp|gdm|zfssnap|upnp|xvm|mysql|openldap|webservd|postgres|svctag|unknown|nobody|noaccess|nobody4|ftp|dhcpserv|aiuser|pkg5srv"`
do
#echo " user name : $i"
if [ `passwd -s $i |awk '{print $2}'` ==  "PS" ]
then
LAST_CHANGE=`cat /etc/shadow|grep $i|cut -d ":" -f 3`
DELTA=`echo $NDAYS - $LAST_CHANGE|bc`
MAX=`logins -x -l $i|grep PS|awk '{print $4}'`
con=`echo " $MAX - $DELTA"|bc`
if  [ $MAX = -1 ]
then
echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
echo "<td>$i USER PASSWD STATUS</td><td>NO PASSWD EXPIRY</td>">>"/tmp/output1"
continue
fi
if [ $DELTA -le $MAX ] && [ $con -le 3 ]
then
echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
echo "<td>$i USER PASSWD STATUS</td><td> PASSWD WILL EXPIRE IN  $con DAYS</td>">>"/tmp/output1"
else
echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
echo "<td>$i USER PASSWD STATUS</td><td> PASSWD WILL EXPIRE IN  $con DAYS</td>">>"/tmp/output1"
fi
else
echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        echo "<td>$i USER PASSWD STATUS</td><td>BAD</td>">>"/tmp/output1"
fi
done
echo "</table>">>"/tmp/output1"
echo "</body>">>"/tmp/output1"
echo "</html>">>"/tmp/output1"
cat "/tmp/output1"|mail chittibabu.miriyala@gmail.com

LDOMS configuratin auto generated mails

# cat /usr/bin/genpactldmconfig
#!/usr/bin/bash
#ldom script
Node=`uname -n`
echo "From:chittibabu.miriyala@gmail.com" >"/tmp/output1"
echo "To:chittibabu.miriyala@gmail.com">>"/tmp/output1"
#Reply-To:chittibabu.miriyala@gmail.com
echo "Subject:Guest VM Config Info: $Node">>"/tmp/output1"
echo "Content-type: text/html">>"/tmp/output1"
echo "<html>">>"/tmp/output1"
echo "<body>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
#echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1>NAME</h1> </td></tr>">>"/tmp/o                                                                              utput1"
echo "<tr BGCOLOR="#FFFF00"><td> <h6>NAME</h6> </td><td> <h6>STATE</h6> </td><td                                                                              > <h6>FLAGS</h6></td><td> <h6>CONS</h6> </td><td> <h6>VCPU</h6></td><td><h6>MEMO                                                                              RYU</h6> </td><td> <h6>UTIL</h6> </td><td colspan="3"><h6>UPTIME</h6></td></tr>"                                                                              >>"/tmp/output1"
LDM=`ldm list |grep -v NAME  |awk '{print $1}'`
for i in `echo $LDM`
do
if [ "`ldm list $i|grep -v NAME|awk '{print $2}'`" == "active" ]
then
        echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
        f=`ldm list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
else
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        f=`ldm list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
fi
done
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
#echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1> $Node</h1> </td></tr>">>"/tmp                                                                              /output1"
echo "<tr BGCOLOR="#FFFF00"><td> <h6>Pool NAME</h6> </td><td> <h6>SIZE</h6> </td                                                                              ><td> <h6>ALLOC</h6></td><td> <h6>FREE</h6> </td><td> <h6>CAP</h6></td><td><h6>D                                                                              EDUP</h6> </td><td> <h6>HEALTH</h6> </td><td> <h6>ALTROOT</h6> </td></tr>">>"/tm                                                                              p/output1"
POOL=`zpool list|grep -v NAME  |awk '{print $1}'`
for i in `echo $POOL`
do
if [ `zpool list $i |grep -v NAME|awk '{print $7}'` == "ONLINE" ]
then
        echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
        f=`zpool list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
else
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        f=`zpool list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
fi
done
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
#echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1>NAME</h1> </td></tr>">>"/tmp/o                                                                              utput1"
echo "<tr BGCOLOR="#FFFF00"><td> <h6>NAME</h6> </td><td> <h6>STATE</h6> </td><td                                                                              > <h6>FLAGS</h6></td><td> <h6>CONS</h6> </td><td> <h6>VCPU</h6></td><td><h6>MEMO                                                                              RYU</h6> </td><td> <h6>UTIL</h6> </td><td colspan="3"><h6>UPTIME</h6></td></tr>"                                                                              >>"/tmp/output1"
LDM=`ldm list |grep -v NAME  |awk '{print $1}'`
for i in `echo $LDM`
do
if [ "`ldm list $i|grep -v NAME|awk '{print $2}'`" == "active" ]
then
        echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
        f=`ldm list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
        echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
        echo "<td colspan=10><pre>">>"/tmp/output1"
        ldm list -l $i >>"/tmp/output1"
        echo " </pre></td>">>"/tmp/output1"
        echo "</tr>">>"/tmp/output1"

else
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        f=`ldm list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        echo "<td colspan=10><pre>">>"/tmp/output1"
        ldm list -l $i >>"/tmp/output1"
        echo " </pre></td>">>"/tmp/output1"
        echo "</tr>">>"/tmp/output1"
fi
done
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
#echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1> $Node</h1> </td></tr>">>"/tmp                                                                              /output1"
echo "<tr BGCOLOR="#FFFF00"><td> <h6>Pool NAME</h6> </td><td> <h6>SIZE</h6> </td                                                                              ><td> <h6>ALLOC</h6></td><td> <h6>FREE</h6> </td><td> <h6>CAP</h6></td><td><h6>D                                                                              EDUP</h6> </td><td> <h6>HEALTH</h6> </td><td> <h6>ALTROOT</h6> </td></tr>">>"/tm                                                                              p/output1"
POOL=`zpool list|grep -v NAME  |awk '{print $1}'`
for i in `echo $POOL`
do
if [ `zpool list $i |grep -v NAME|awk '{print $7}'` == "ONLINE" ]
then
        echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
        f=`zpool list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
        echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
        echo "<td colspan=10><pre>">>"/tmp/output1"
        zpool status -v  $i >>"/tmp/output1"
        echo " </pre></td>">>"/tmp/output1"
        echo "</tr>">>"/tmp/output1"

else
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        f=`zpool list $i|grep -v NAME`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
        echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
        echo "<td colspan=10><pre>">>"/tmp/output1"
        zpool status -v  $i >>"/tmp/output1"
        echo " </pre></td>">>"/tmp/output1"
        echo "</tr>">>"/tmp/output1"

fi
done
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
echo "<tr BGCOLOR="#FFFF00"> <h6>LDOM CONFIGURATION INFORMATION </h6> </td></tr>                                                                              ">>"/tmp/output1"
echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
echo "<td><pre>">>"/tmp/output1"
ldm list-config >>"/tmp/output1"
echo " </pre></td>">>"/tmp/output1"
echo "</tr>">>"/tmp/output1"
echo "</table>">>"/tmp/output1"
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
echo "<tr BGCOLOR="#FFFF00"> <h6>LDOM SERVICE INFORMATION </h6> </td></tr>">>"/t                                                                              mp/output1"
echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
echo "<td><pre>">>"/tmp/output1"
ldm list-services >>"/tmp/output1"
echo " </pre></td>">>"/tmp/output1"
echo "</tr>">>"/tmp/output1"
echo "</table>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
echo "<tr BGCOLOR="#FFFF00"> <h6>LDOM I/O INFORMATION </h6> </td></tr>">>"/t                                                                              mp/output1"
echo "<TR BGCOLOR="#CCEEFF">">>"/tmp/output1"
echo "<td><pre>">>"/tmp/output1"
ldm list-io -l >>"/tmp/output1"
echo " </pre></td>">>"/tmp/output1"
echo "</tr>">>"/tmp/output1"
echo "</table>">>"/tmp/output1"
echo "</body>">>"/tmp/output1"
echo "</html>">>"/tmp/output1"
cat "/tmp/output1"|mail chittibabu.miriyala@gmail.com

Saturday, 5 July 2014

file system checking script

#!/usr/bin/bash
#########################################
######### Chittibabu Generated SCRIPT########
######### FILE SYSTEM CHECK##############
##VERSION=1.0############################
##DESIGN&IMPLEMENTED:CHITTIBABU MIRIYALA#
##TESED BY :MAHESH KUMAR#################
#########################################
Node=`uname -n`
echo "From:chittibabu.miriyala@gmail.com" >"/tmp/output1"
echo "To:chittibabu.miriyala@gmail.com">>"/tmp/output1"
#Reply-To:chittibabu.miriyala@gmail.com
echo "Subject:Filesystem Space Check : $Node">>"/tmp/output1"
echo "Content-type: text/html">>"/tmp/output1"
echo "<html>">>"/tmp/output1"
echo "<body>">>"/tmp/output1"
echo "<table width=100%>">>"/tmp/output1"
echo "<tr BGCOLOR="#FFFF00"><td colspan="6"> <h1> $Node</h1> </td></tr>">>"/tmp/output1"
#echo "<tr> `cat /etc/hosts|grep `hostname`|grep -v "#"`">>"/tmp/output1"
#echo "</tr>
FS=`df -h |grep -v Filesystem |awk '{print $6}'`
for i in `echo $FS`
do
##[[`df -h $i|grep -v Filesystem|awk '{print $5}'` -le 50]]&& echo "les 50" || echo "gre 50"
if [ `df -h $i|grep -v Filesystem|awk '{print $5}'|tr -d %` -le 50 ]
then
        echo "<TR BGCOLOR="#00FF00">">>"/tmp/output1"
        f=`df -h $i|grep -v Filesystem`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
else
        echo "<TR BGCOLOR="#FF0000">">>"/tmp/output1"
        f=`df -h $i|grep -v Filesystem`
        for y in `echo $f`
        do
        echo "<td> $y</td>">>"/tmp/output1"
        done
        echo "</tr>">>"/tmp/output1"
fi
done
echo "</table>">>"/tmp/output1"
echo "</body>">>"/tmp/output1"
echo "</html>">>"/tmp/output1"
cat "/tmp/output1"|mail mailto:chittibabu.miriyala@gmail.com

Thursday, 3 July 2014

passwd expiry in solaris 10

# NDAYS=`/usr/bin/perl -e 'printf("%d\n", time / (3600 * 24))'`
# echo $NDAYS
16255
# cat /etc/shadow|grep test|cut -d ":" -f 3
16250
# user test
changedeltal=totaldays-passwd last change
delta=16255-16250
delta=5

expiredate=maxpasswdexpiry - delta
ex: 13 weeks =91 days
expirfy date=91-5
     86 days to exprie

=======or========
#logins -x -l test
passwd status:-
# logins -x -l test|grep PS|awk '{print $1}'
PS
passwd chaged date:-
# logins -x -l test|grep PS|awk '{print $2}'
070414
passwd min days to expire
# logins -x -l test|grep PS|awk '{print $3}'
10
passwd max days to expire
# logins -x -l test|grep PS|awk '{print $4}'
20

Saturday, 10 May 2014

While doing KJP unzip command not working throwing error & lack of excutable persmissons to scripts in Patches How to resolve ??

# unzip 10_Recommended.zip
Archive:  10_Recommended.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of 10_Recommended.zip or
        10_Recommended.zip.zip, and cannot find 10_Recommended.zip.ZIP, period.

Solution:-
Before extracting REcommended patches its home directory should contain 777 permission
other wise extraced files may not get executable permissions due to this patching does not happens
if unzip Command not support latest Zip files use JAR Command
#jar -xf 10_Recommended.zip (it extracts in current location)
-->Hear Wipro is home directory which does not have 777 permissions so jar extracts files does not
have executable privilages so we face below problem

# ./installpatchset --s10patchset
Setup ..

Recommended OS Patchset Solaris 10 SPARC (2014.05.07)
The patch set will complete installation in this session. No intermediate
reboots are required.
Application of patches started : 2014.05.10 10:47:25
Applying 120900-04 (  1 of 373) ... skipped
Applying 121133-02 (  2 of 373) ... skipped
Applying 119254-89 (  3 of 373) ... failed
Application of patches finished : 2014.05.10 10:47:28

Following patches were skipped :
 Patches already applied
 120900-04     121133-02
Following patch failed to apply :
 119254-89
Aborting due to failure while applying patch 119254-89.
Application of this patch should have succeeded - this failure is unexpected.
Please assess cause of failure and verify system integrity before proceeding.
Install log files written :
  /var/sadm/install_data/s10s_rec_patchset_short_2014.05.10_10.47.25.log
  /var/sadm/install_data/s10s_rec_patchset_verbose_2014.05.10_10.47.25.log
  /var/sadm/install_data/s10s_rec_patchset_failed_2014.05.10_10.47.25.log
 # pwd
/wipro/10_Recommended
 # ls
10_Recommended.README  Copyright              installcluster         patch_order            patchset.conf
10_Recommended.html    LEGAL_LICENSE.TXT      installpatchset        patches
# patchadd 119254-89
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
Done!
Checking patches that you specified for installation.
Done!

Approved patches will be installed in this order:
119254-89

ERROR: The /wipro/10_Recommended/patches/119254-89/prepatch script contains invalid permissions. Please make the script executable and reinstall 119254-89.
WARNING: Skipping patch
# ls -l /wipro/10_Recommended/patches/119254-89/prepatch
-rw-r--r--   1 root     root         539 May 10 09:45 /wipro/10_Recommended/patches/119254-89/prepatch
 # chmod 755 /wipro/10_Recommended/patches/119254-89/prepatch
 # patchadd 119254-89
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
Done!
Checking patches that you specified for installation.
Done!

Approved patches will be installed in this order:
119254-89

ERROR: The /wipro/10_Recommended/patches/119254-89/postpatch script contains invalid permissions. Please make the script executable and reinstall 119254-89.
WARNING: Skipping patch
# ls -l /wipro/10_Recommended/patches/119254-89/prepatch
-rwxr-xr-x   1 root     root         539 May 10 09:45 /wipro/10_Recommended/patches/119254-89/prepatch
 # ls -l /wipro/10_Recommended/patches/119254-89/postpatch
-rw-r--r--   1 root     root        2951 May 10 09:45 /wipro/10_Recommended/patches/119254-89/postpatch
You have new mail in /var/mail/root
 # chmod 755 /wipro/10_Recommended/patches/119254-89/postpatch

--->after change permission of Prepatch & Postpatch scripts patch installed successfully & repeat for following patch also.

 # patchadd 119254-89
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
Done!
Checking patches that you specified for installation.
Done!

Approved patches will be installed in this order:
119254-89

Checking installed patches...
Executing prepatch script...
Installing patch packages...
Patch 119254-89 has been successfully installed.
See /var/sadm/patch/119254-89/log for details
Executing postpatch script...
Patch packages installed:
  SUNWinstall-patch-utils-root
  SUNWpkgcmdsr
  SUNWpkgcmdsu
  SUNWswmt
 # cd ..
 # ls
10_Recommended.README  Copyright              installcluster         patch_order            patchset.conf
10_Recommended.html    LEGAL_LICENSE.TXT      installpatchset        patches
 # ./installpatchset --s10patchset
Setup ..

Recommended OS Patchset Solaris 10 SPARC (2014.05.07)
The patch set will complete installation in this session. No intermediate
reboots are required.
Application of patches started : 2014.05.10 10:50:23
Applying 120900-04 (  1 of 373) ... skipped
Applying 121133-02 (  2 of 373) ... skipped
Applying 119254-89 (  3 of 373) ... skipped
Applying 119317-01 (  4 of 373) ... skipped
Applying 121296-01 (  5 of 373) ... skipped
Applying 138215-01 (  6 of 373) ... skipped
Applying 148336-01 (  7 of 373) ... failed
Application of patches finished : 2014.05.10 10:50:30

Following patches were skipped :
 Patches already applied
 120900-04     119254-89     119317-01     121296-01     138215-01
 121133-02
Following patch failed to apply :
 148336-01
Aborting due to failure while applying patch 148336-01.
Application of this patch should have succeeded - this failure is unexpected.
Please assess cause of failure and verify system integrity before proceeding.
Install log files written :
  /var/sadm/install_data/s10s_rec_patchset_short_2014.05.10_10.50.23.log
  /var/sadm/install_data/s10s_rec_patchset_verbose_2014.05.10_10.50.23.log
  /var/sadm/install_data/s10s_rec_patchset_failed_2014.05.10_10.50.23.log
 # cd 148336-01
 # ls
148336-01.html     README.148336-01   SUNWxcu4           postbackout        prebackout
LEGAL_LICENSE.TXT  SUNWesu            patchinfo          postpatch          prepatch
 # ls -l
total 50
-rw-r--r--   1 root     root        7121 May 10 10:09 148336-01.html
-rw-r--r--   1 root     root         183 May 10 10:09 LEGAL_LICENSE.TXT
-rw-r--r--   1 root     root        3306 May 10 10:09 README.148336-01
drwxr-xr-x   4 root     root         512 May 10 10:09 SUNWesu
drwxr-xr-x   4 root     root         512 May 10 10:09 SUNWxcu4
-rw-r--r--   1 root     root         217 May 10 10:09 patchinfo
-rw-r--r--   1 root     root        1833 May 10 10:09 postbackout
-rw-r--r--   1 root     root        1829 May 10 10:09 postpatch
-rw-r--r--   1 root     root        2433 May 10 10:09 prebackout
-rw-r--r--   1 root     root        2429 May 10 10:09 prepatch
 # chmod 755 prepatch postpatch
 # ls -lrth
total 50
drwxr-xr-x   4 root     root         512 May 10 10:09 SUNWxcu4
-rw-r--r--   1 root     root         183 May 10 10:09 LEGAL_LICENSE.TXT
-rw-r--r--   1 root     root        2.4K May 10 10:09 prebackout
-rwxr-xr-x   1 root     root        1.8K May 10 10:09 postpatch
drwxr-xr-x   4 root     root         512 May 10 10:09 SUNWesu
-rw-r--r--   1 root     root        7.0K May 10 10:09 148336-01.html
-rwxr-xr-x   1 root     root        2.4K May 10 10:09 prepatch
-rw-r--r--   1 root     root        3.2K May 10 10:09 README.148336-01
-rw-r--r--   1 root     root        1.8K May 10 10:09 postbackout
-rw-r--r--   1 root     root         217 May 10 10:09 patchinfo
 # pwd
/wipro/10_Recommended/patches/148336-01
 # cd ..
 # patchadd 148336-01
Validating patches...
Loading patches installed on the system...
Done!
Loading patches requested to install.
Done!
Checking patches that you specified for installation.
Done!

Approved patches will be installed in this order:
148336-01

Checking installed patches...
Executing prepatch script...
Installing patch packages...
Patch 148336-01 has been successfully installed.
See /var/sadm/patch/148336-01/log for details
Executing postpatch script...
Patch packages installed:
  SUNWesu
  SUNWxcu4
 # cd ..
 # ls
10_Recommended.README  Copyright              installcluster         patch_order            patchset.conf
10_Recommended.html    LEGAL_LICENSE.TXT      installpatchset        patches
 # ./installpatchset --s10patchset
Setup .....

Recommended OS Patchset Solaris 10 SPARC (2014.05.07)
The patch set will complete installation in this session. No intermediate
reboots are required.
Application of patches started : 2014.05.10 10:53:19
Applying 120900-04 (  1 of 373) ... skipped
Applying 121133-02 (  2 of 373) ... skipped
Applying 119254-89 (  3 of 373) ... skipped
Applying 119317-01 (  4 of 373) ... skipped
Applying 121296-01 (  5 of 373) ... skipped
Applying 138215-01 (  6 of 373) ... skipped
Applying 148336-01 (  7 of 373) ... skipped
Applying 146054-07 (  8 of 373) ... failed
Application of patches finished : 2014.05.10 10:53:34

Following patches were skipped :
 Patches already applied
 120900-04     119254-89     121296-01     138215-01     148336-01
 121133-02     119317-01
Following patch failed to apply :
 146054-07
Aborting due to failure while applying patch 146054-07.
Application of this patch should have succeeded - this failure is unexpected.
Please assess cause of failure and verify system integrity before proceeding.
Install log files written :
  /var/sadm/install_data/s10s_rec_patchset_short_2014.05.10_10.53.19.log
  /var/sadm/install_data/s10s_rec_patchset_verbose_2014.05.10_10.53.19.log
  /var/sadm/install_data/s10s_rec_patchset_failed_2014.05.10_10.53.19.log
 # cd patches/146054-07
 # chmod 755 prepatch postpatch
 # pwd
/wipro/10_Recommended/patches/146054-07
 # pwd
/wipro/10_Recommended/patches/146054-07
------>so i changed recursively to all files in WIPRO HOmedirectory now KJP done successfully.

 # chmod -R 755 /wipro


 # ls
10_Recommended.README  Copyright              installcluster         patch_order            patchset.conf
10_Recommended.html    LEGAL_LICENSE.TXT      installpatchset        patches
 # ./installpatchset --s10patchset
Setup ....

Recommended OS Patchset Solaris 10 SPARC (2014.05.07)
The patch set will complete installation in this session. No intermediate
reboots are required.
Application of patches started : 2014.05.10 10:58:20
Applying 120900-04 (  1 of 373) ... skipped
Applying 121133-02 (  2 of 373) ... skipped
Applying 119254-89 (  3 of 373) ... skipped
..............
updated successfully