Page 1 of 1

Running job with dsjob when user does not have permissions

Posted: Sat Jan 14, 2012 9:42 am
by vskr72
The user that I log into does not have permissions. So, I as suggested to use sudo to implement it. When I used sudo, and see the output, I get the return code value as 0 and the job is not running. Not sure what this means. Does this implementation ever work?

Code: Select all

sudo -l -u dsadm ${DSHOME}/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL ${DSProj} ${JobName} > ${sTmpFile}
+ sudo -l -u dsadm /opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master

   iDSRetCode=$?
+ iDSRetCode=0
Pls advice for any alternatives.

Posted: Sat Jan 14, 2012 10:25 am
by pandeesh
Are you getting anything in ${sTmpFile} ?
And also use either -wait or -jobstatus switch, but not both.

Posted: Sat Jan 14, 2012 1:13 pm
by vskr72
THis is what I get in the TmpFile

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master

Posted: Sat Jan 14, 2012 1:16 pm
by pandeesh
pandeesh wrote:And also use either -wait or -jobstatus switch, but not both.
And what about this?

Posted: Sat Jan 14, 2012 1:17 pm
by vskr72
THis is what I get in the TmpFile

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -wait -warn 0 -jobstatus -mode NORMAL DEV_EDW master

Posted: Sat Jan 14, 2012 1:23 pm
by pandeesh
Please re-read my previous post carefully:
And try the below command in the shell:(Do not execute as it's .please pass the parameters accordingly)

Code: Select all

sudo -l -u dsadm ${DSHOME}/bin/dsjob -run -wait -warn 0  -mode NORMAL ${DSProj} ${JobName}
Run this and post what you are getting.

Posted: Sat Jan 14, 2012 2:28 pm
by ray.wurlod
Why are you seeking to bypass the fact that you do not have permission? Perhaps there's a reason they have not given you permission. To test this theory, request permission.

Posted: Sat Jan 14, 2012 3:07 pm
by vskr72
Without the Sudo I realized that I do not have permissions and I requested. So they said they gave me permission and that it will only work with the sudo option. The way they suggested is before you call the dsjob command put 'sudo -l -u dsadm'. This the little background.

Posted: Sat Jan 14, 2012 5:35 pm
by chulett
Try it without the "-l" in the sudo command for grins.

Posted: Sat Jan 14, 2012 6:14 pm
by vskr72
GIves me this msg:

Code: Select all

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob: error while loading shared libraries: libvmdsapi.so: cannot open shared object file: No such file or directory


Posted: Sat Jan 14, 2012 6:17 pm
by PaulVL
Use the -user and -password option of an ID that does have authority, also... I will second the motion of DON'T RUN IF YOU ARE NOT ALLOWED TO RUN.

Posted: Sat Jan 14, 2012 6:17 pm
by vskr72
GIves me this msg:

Code: Select all

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob: error while loading shared libraries: libvmdsapi.so: cannot open shared object file: No such file or directory


Posted: Sat Jan 14, 2012 6:17 pm
by PaulVL
Most likely because you didn't source dsenv.

Posted: Sat Jan 14, 2012 6:17 pm
by chulett
Source your dsenv file and try again.

Posted: Sat Jan 14, 2012 6:22 pm
by qt_ky
Have your admin put your ID in the same group as the dsadm ID and make sure group read and execute permissions are set on the dsjob file.