Prefix user accounts we create

- Helps protect against users named 'root'
- Makes it clearer that you should not rely on these users
  for general PAM work, because they are prefixed.

Fixes #9
This commit is contained in:
yuvipanda
2018-07-12 13:33:24 -07:00
parent c749d1a09f
commit 9e1bf84647
2 changed files with 12 additions and 4 deletions

View File

@@ -49,6 +49,7 @@ def apply_yaml_config(path, c):
update_userlists(c, tljh_config)
update_limits(c, tljh_config)
update_user_environment(c, tljh_config)
update_user_account_config(c, tljh_config)
def update_auth(c, config):
@@ -102,6 +103,10 @@ def update_user_environment(c, config):
c.Spawner.default_url = '/nteract'
def update_user_account_config(c, config):
c.SystemdSpawner.username_template = 'jupyter-{USERNAME}'
def _merge_dictionaries(a, b, path=None, update=True):
"""
Merge two dictionaries recursively.