Skip to main content
Crusoe Support Help Center home page
Crusoe

How-To Add a User to Slurm

Randall Gee
Randall Gee
Updated

Last Updated: Dec 25, 2025

 

Introduction

There may come a time where you'll need to add an additional user to your SLURM cluster. Here's a step-by-step article on how to add a user to your SLURM cluster.

 

Step-by-Step Instructions

  1. Method 1 - Terraform: Update the SLURM main.tf file

To add additional users to your cluster, configure the slurm_users variable in your terraform.tfvars file and run terraform apply. 

The following example adds three additional users user1, user2, and user3 to the SLURM cluster.

# slurm users configuration
slurm_users = [{
name = "user1"
uid = 1001
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjPRr0iVR4mgzJy0ehnM5hWX4O86hM1bVTgdi5g3nkZ user1@crusoe.ai"
}, {
name = "user2"
uid = 1002
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjPRr0iVR4mgzJy0ehnM5hWX4O86hM1bVTgdi5g3nkZ user2@crusoe.ai"
}, {
name = "user3"
uid = 1003
ssh_pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjPRr0iVR4mgzJy0ehnM5hWX4O86hM1bVTgdi5g3nkZ user3@crusoe.ai"
}]

 

2. Method 2 - Manual: Run useradd on the login and head node

  • Run the following commands on both the login and head node
sudo useradd -u $NEW_USER_UID $NEW_USER -s /bin/bash -m
sudo usermod -aG <group_name> <user_name>
sudo passwd -d $NEW_USER
  • Then add the SSH key for the new user to the ~/.ssh/authorized_keys file on each of those nodes to enable SSH access to the cluster.

 

Additional Resources

Related to

Was this article helpful?

0 out of 0 found this helpful

Still need help?

Our support team is ready to assist you with any questions.

Have more questions? Submit a request

Recently Viewed

Comments

0 comments

Article is closed for comments.