Bug 1779582 - SLURM by default running as root
Summary: SLURM by default running as root
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: slurm
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Philip Kovacs
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-04 10:07 UTC by Kees de Jong
Modified: 2019-12-19 11:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-19 11:42:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kees de Jong 2019-12-04 10:07:31 UTC
Description of problem:
When SLURM is installed, it by default uses the user 'root'. The only service that needs to run as root is slurmd (client). I therefore suggest to change the default user to a dedicated SLURM user, e.g. the user 'slurm' with e.g. UID/GID of 64030 to be compatible with Debian-based systems (when e.g. using Federated SLURM). Or an UID/GID in the system UID/GID range. But at least a reserved UID/GID for SLURM to run as non-root for all but slurmd (SlurmdUser in slurm.conf is by default ran as the root user).

This also requires to change the ownership of the directories of SLURM services.

If this is not a good suggestion, then please explain the reasoning, then the community is aware of it as well. Thanks!

Version-Release number of selected component (if applicable): slurm-19.05.4-1.fc31

Comment 1 Philip Kovacs 2019-12-04 11:47:13 UTC
I considered petitioning the Fedora packaging committee for a soft static allocation years ago when I first packaged slurm.  I opted instead to write a script called slurm-setuser which allows you to run slurm as the user you desire, adjusting the slurm file/directory permissions and config files with one command.  The script is in the slurm base package.


Note You need to log in before you can comment on or make changes to this bug.