Submit jobs as other users

Use the bsubmit command with the lsf.usermapping configuration file to submit jobs as other users.

A job submission user can submit jobs as another job execution user. This is useful if you want the job submission user to be a particular user, but to map the job execution user to other users.

To enable this feature, you can download and deploy the example bsubmit command executable file, which is a wrapper for the bsub command. Note that the bsubmit command is not included with LSF; to use the command, you build it from the source at: https://github.com/IBMSpectrumComputing/lsf-utils/tree/master/bsubmit.

Using the bsubmit example, you can define the execution users to which you can map submission users, create a configuration file named lsf.usermapping in the $LSF_ENVDIR directory to define the user mapping policy for the bsubmit command. The lsf.usermapping allows you to map several job execution users and user groups to a single submission user or user group. This file must be owned by the LSF administrator, with file permissions set to read/write for the owner and read-only for all other users. For each row, specify the submission user or group to the left and a comma-separated list of execution users or groups on the right.

For example:
#Submission user or group    # Execution users or groups
userA                        userB,userC,userD
groupA                       groupB

This lsf.usermapping configuration file means that the userA user can submit jobs as userB, userC, or userD. Users in the groupA group can submit jobs as any user in the groupB user group.

To submit jobs as other users, use the bsubmit command. For example, run the following command if the job submission user userA is submitting a job as job execution user userC:
bsubmit --user userC myjob