Changing the UserID used by JobScheduler on Unix systems
One of the files on our file system belongs to a different user to that used by our JobScheduler.
This is causing the following errors:
I noticed there is a
setuid utility that could be used, I have looked through the FAQ, could you give us some information please as this could fix our issue?
The setuid utility is deprecated.
- FEATURE AVAILABILITY ENDING WITH RELEASE 1.11
- JS-1565 - Retirement of setuid utility to access files owned by a different user Removed
There are multiple ways running jobs with different user ids in order to access objects belonging to a different user:
Use Agent instances
Multiple Agents can be operated to run in different accounts from the same Agent installation
For details see JobScheduler Universal Agent - Running multiple instances
sudoin the JobScheduler job
To access a file belonging to "other_user" use
sudo -u other_user script_for_other_user.sh
Make sure that
other_userdoesn't require a password for
sudo. This can be achieved by adjusting the configuration from the
sudoersfile. This method is extremely flexible - you can change the user more than once within a job. if
sudorequires a password then you can use
echo "<password>" | sudo -S -u other_user script_for_other_user.sh
- Use SSH jobs
- The use of SSH is not restricted to remote computers - you can use it to access local files.
- A JITL SSH job is provided with each JobScheduler installation. See the following articles: