Set Up Jupyter Sudospawner

For Enterprise Steam to create jupyter servers on user’s behalf using the sudospawner, the steam user must be set up to run the sudospawner script with passwordless sudo.

The following rules must be added with visudo to sudoers:

# Script used by steam to spawn jupyter servers on a user's behalf
Cmnd_Alias JUPYTER_CMND = /opt/h2oai/steam/lib/steam-virtualenv/bin/sudospawner
# Allow steam to run sudospawner as any user without a password
steam ALL=(ALL) NOPASSWD:SETENV:JUPYTER_CMND

This can be made more restricted by specifying the users steam is able to impersonate

Runas_Alias STEAM_USERS = user1, user2, user3

# Script used by steam to spawn jupyter servers on a user's behalf
Cmnd_Alias JUPYTER_CMND = /opt/h2oai/steam/lib/steam-virtualenv/bin/sudospawner

# Allow steam to run sudospawner as any user without a password
steam ALL=(STEAM_USERS) NOPASSWD:SETENV:JUPYTER_CMND