Thanks a lot for the answers! So, if I understand this correctly, for some reason, `srun` does not need root privileges on the computation node side, but `sbatch` does when scheduling. I was afraid doing so would mean users could do things such as apt install and such, but it does not seem the case.
I am not going to be managing the actual cluster, only exploring possibilities. At this point I am mostly convinced slurmdUser=sudo is safe, so that is one less potential problem. Maybe I should open a new thread, but, for some reason, when I submit -- #! /bin/bash #SBATCH -J myjob #SBATCH -uid test whoami -- the execution silently fails, and the log in the computation node says "/home/test/d" does not exist. According to the documentation, -uid is intended for sudo to emulate sending jobs as different users, but the behaviour is a bit odd... @Patrick: I do not know how to do that. I only know that I can make slurm sudoer and NOPASSWD, but slurm would still call to `chown` (not `sudo chown`). An alternative would be replacing `chown` with a small script that calls `sudo chown`, but that is likely to break a lot of stuff. I assume slurmd will also need other root-only commands to work. @Michael Indeed, the documentation/tutorials often mention that SlurmdUser should be root, but it is not clearly explained why anywhere (e.g. https://slurm.schedmd.com/quickstart_admin.html section Daemons). It seems that `srun whoami` returns the current user (and not root), so even when slurmdUser is root, users do not have privileges, so in principle there is no problem at all. @Jeffrey It is expected to be multi-user. As for your third option, I think you refer to something similar to what I wrote for Patrick.