How to change admin password using LocalAuthenticator

Hi,

I recently set up a (normal) JupyterHub server that, I believe, is using the LocalAuthenticator (I understand that is the default authenticator and I can log in with the credentials of user existing on the underlying host).

Now I want to change the admin user’s password. For any normal old user I would change the user’s host machine password and be done. But JupyterHub’s admin user does not seem to exist on the underlying machine as a user. So I don’t know how to change the admin user’s password (I can’t find any option in the GUI either).

Any tips?

Thanks!

How did you configure your admin user in the first place? Normally you will need to set a list of admin users in the Authenticator config. These users should be your regular users on your host system. So, if you want to change the password of the admin user, you should normally change the password of the user on the system.

When using PAM (the default), JupyterHub doesn’t have any mechanism for managing passwords, only checking them. It also won’t create users that don’t exist on the system unless you ask it to with c.LocalAuthenticator.create_system_users = True. If a user is created in this way, it will not have a password, but you can create one at any time with the standard system mechanisms, e.g. passwd USERNAME.

JupyterHub also doesn’t have a notion of an ‘admin’ user that’s not created by your explicit configuration (or your Authenticator). If you have users in the JupyterHub database and/or your configuration that don’t exist on the system, this should produce some warnings on startup, like:

    KeyError: 'User some-user-name does not exist on the system. Set LocalAuthenticator.create_system_users=True to automatically create system users from jupyterhub users.'