Posted: Wed Jun 12, 2019 2:39 am Post subject: Triggering with different user program
Newbie
Joined: 12 Jun 2019 Posts: 2
Hello:
Is it possible to have a process (UNIX/AIX) triggering a shell script from a different user than the mqm user? Of course the script shouldn't have execute permission for everyone on the system.
Right now what I do to make it work is changing the script group to mqm and do a chmod u+s to the script.
Example:
-rwsr-x--- 1 admapp mqm 7410 Jan 05 2018 desenvFT.sh
I've checked that the runmqtrm executable has 750 permissions), but I don't want to change this binary as my changes would be overwritten by a new patch or version.
Does anyone use a copy of runmqtrm with full permissions to have as many trigger monitors running with different users as needed?
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
The MQ trigger monitor usually runs as mqm. The triggered script could do a "sudo su - YourUserid -c YourScriptName" command to run another script under a different user. sudo rules would need to be set up to allow this to be done without a password.
HTH, Glenn. _________________ Glenn
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum