Is it possible to allow multiple jupyter users to share the same linux account?

Due to some complex reasons, my server cannot add additional users. My team shares the same Linux account to work on the server. We deployed JupyterLab before, and different users access the same instance. Each time they access it, they can see the terminals or notebooks of others in operation, which is very inconvenient.

Therefore, we started to use JupyterHub, hoping to isolate the workspaces of different users. But I found that the users of JupyterHub are actually bound to the users of the Linux system: even if the DummyAuthenticator is used to allow usernames different from the system to log in, the spawner still needs a unique username supported by Linux when starting an instance.

Is it possible to use different users when logging into JupyterHub, while these different “Jupyter users” can use the same “Linux user” to start different service instances?

(At present, I can achieve a similar effect by setting

allow_named_servers=True

and assigning different URLs to different users, but some contents, such as the opened notebooks, are shared between services and cannot be as clean as different users.)

If you fully trust your users you can try SimpleLocalProcessSpawner:

It uses temporary home directories since it’s just for testing and development, so you’ll need to configure things like home_dir_template.

1 Like

this works great for me, thanks a lot!

1 Like