On 10 May 2018, at 19:48, Christopher Benjamin Coffey <chris.cof...@nau.edu> 
wrote:
> We noticed that recently --uid, and --gid functionality changed where 
> previously a user in the slurm administrators group could launch jobs 
> successfully with --uid, and --gid , allowing for them to submit jobs as 
> another user. Now, in order to use --uid, --gid, you have to be the root user.

Relatedly, we have a pipeline robot user that is a member of a number of Unix 
groups corresponding to different scientific projects. Its dispatcher scripts 
submit jobs with

        sbatch --gid=$group_for_project ...

so that the jobs run as the particular robot-uid/project-gid and output files 
generated automatically get the appropriate project group ownership.

Though the man page says --gid is for when "sbatch is run as root", we found 
that it works and so we used it so that the (completely unprivileged) robot 
user could select which of its supplementary groups to run jobs as.

On bug 4101 Tim also wrote:

# Admittedly, the 'su' command is preferable in almost all instances, and I 
would
# suggest anyone with such a workflow move to that rather than this quirky 
approach.

To me, SLURM is in the business of setting up jobs from whole cloth, and it 
would be preferable to be able to specify the desired group (of which the user 
is already a member) on the sbatch command line rather than having to wrap the 
whole thing in an extra layer of sg(1).

    John

Reply via email to