Setup Jupyterhub setup with NativeAuthenticator

Hello All
i am setting up jupyterhub server for the firts time and need some help am having couple of issues i am trying to setup jupyterhub server on redhat linux with NativeAuthenticator in the jupyterconfig.py file but when i run the jupyterhub it allows me to create a username and password but when i try to log in it does not log in and even when i try to log in with root user , the other thing is am not able to access the admin page to authorize the user can anybody please guide me on how would i go about fixing the issue
Thanks
sudi

Hey @sudi007!

When you’re adding a new user through the signup page (/hub/signup), that user will be able to login only after it was authorized by an admin.

If you’re using NativeAuthenticator for the first time and don’t have any admin configured, you’ll have to:

  • Add the admin user to the JupyterHub admin list. In jupyterhub_config.py add:
    c.NativeAuthenticator.admin_users = {'<your-admin-user'>}
  • Register that admin with NativeAuthenticator through the signup page (go to /hub/signup and add <your-admin-user> and set a password for it)
  • Login as <your-admin-user> using the credentials you just set.

Now that you’re logged in as an admin user, from the admin panel you’ll be able to authorize any user added trough the signup page.

(Linked GitHub issues: https://github.com/jupyterhub/jupyterhub/issues/2988 and https://github.com/jupyterhub/nativeauthenticator/issues/104)

1 Like

Hello Georgiana Elena

Thanks for the insight was able to get that resolved the issue but am still having an issue with when i authorize the user and login with that user name i get and error

500 : Internal Server Error

Error in Authenticator.pre_spawn_start: KeyError “getpwnam(): name not found: ‘admin’”

You can try restarting your server from the home page.doing research i found that user that was created does not have access though the user is authorize so how do i go about giving them access without making them admin

To give access to a user, navigate to /hub/authorize (from an admin account) and press the Authorize button for that user (checkout the docs).

When you hit that Authorize button, you are not making the user an admin, you’re just giving them access to login to JupyterHub.

so when i authorize the user and log inwith that user account i get the following error

500 : Internal Server Error

Error in Authenticator.pre_spawn_start: KeyError “getpwnam(): name not found: ‘admin’”

You can try restarting your server from the home page

Hi there, I am - as we speak - experiencing the same problem. Have you found, by any chance, a solution yet?

@Nenoo i am still experiencing the same problem have not found any solution yet,am still searching for the solution

Thanks

@sudi007, if you’re using the default JupyterHub spawner (LocalProcessSpawner), then you have to make sure that for each authenticated user, there is also a matching local UNIX user.
(The useradd command can be used to create the admin user on your system.)

Yes am using local spwaner but i dont users to be admin for the machine when i add them is there any simple i can add users without being admin so they get access to resources

Thanks

Sudesh

Anyone figure this out? I’m also having the same issue. I can whitelist the user as the admin and get to the admin page but I still cant generate a server, i get 500 error. Thanks