Jupyterhub works as root but not as a user

I set up and installed the requirements as root with pip3 and I followed the guide here: https://jupyterhub.readthedocs.io/en/stable/reference/config-sudo.htm

However, I am still getting an error about a substring not being found when I try to launch jupyterhub as a regular user using the command:
sudo -u username jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner

I literally have almost the same error as this person here and barely anyone responded: Cannot login to Jupyterhub for new user -- ValueError: substring not found · Issue #436 · jupyter/jupyter · GitHub

I have tried so many solutions from changing the sudo file and disabling SELinux etc. Running out of ideas here. Could anyone point me in the right direction. I am trying to re-install everything as I write this.

Hi! Could you show us:

  • Your full jupyterhub config with secrets redacted
  • Full details about how you deployed JupyterHub (your link doesn’t work)
  • Details about your system setup e.g. operating system

Ideally enough information for someone to fully reproduce your setup.

Alternatively if you’re new to JupyterHub I’d recommend following this guide instead of setting it up from scratch:

1 Like