Skip to content

'Add User' not working for admin users with JupyterHub run using PAMAuthentication and SudoSpawner #58

@kipstakkr

Description

@kipstakkr

I've configured Jupyterhub with SudoSpawner (which runs as a non-root user) and I'm able to run it without any trouble. But when I logged in with the user rhea (as provided in the example) with admin permissions set, I'm not able to add users in the system. I'm getting the following error:

[E 2019-07-24 08:26:56.638 JupyterHub users:94] Failed to create user: newuser
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/apihandlers/users.py", line 92, in post
await maybe_future(self.authenticator.add_user(user))
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/auth.py", line 711, in add_user
await maybe_future(self.add_system_user(user))
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/auth.py", line 771, in add_system_user
raise RuntimeError("Failed to create system user %s: %s" % (name, err))
RuntimeError: Failed to create system user newuser: adduser: Only root may add a user or group to the system.

I'm guessing it is caused by running JupyterHub as a non-root user and also using PAM Authentication which eventually uses the system users. The only limitation for my project is I must not run JupyterHub as a root user. Is there a way to add users using sudospawner with a different authenticator, else Is there a way to give restricted sudo permission for the user rhea to be able to add users to the system?? @minrk @willingc @yuvipanda

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssue that can be solved with documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions