[slurm-users] Why SlurmUser is set to slurm by default?
paran at nsc.liu.se
Fri May 25 04:08:00 MDT 2018
On 05/24/2018 11:17 AM, Taras Shapovalov wrote:
> We always use the default value for SlurmUser, but now we have realized
> that we don't really get why it is user slurm, but not root. Sometimes
> it is useful to run SlurmctlProlog as root, but then slurmctld will also
> run as root. Other workload managers are ok to run their control daemons
> as root. Did you have something specific in mind when set this default
> value in slurm.conf or it is just in case for security reasons?
It is a bad idea to run things as root that does not require root
privileges. This is basic systems administration best practices and
nothing Slurm specific. If some other workload manager runs all its
services as root by default then that is a problem with the other
software, not Slurm.
You can configure sudo to allow the slurm user to run specific commands
as root, something like this:
sudo -E /path/to/command/run/as/root || exit 1
slurm ALL=(ALL) NOPASSWD: SETENV: /path/to/command/run/as/root
Pär Lindfors, NSC
More information about the slurm-users