I’ve install jupyterhub 4.0.1 on my tencentcloud which based on centos 7.9.
below is my jupyterhub_config.py
c = get_config() #noqa
# Default: False
c.JupyterHub.admin_access = True
c.JupyterHub.hub_ip = ''
c.JupyterHub.port = 9000
c.JupyterHub.shutdown_on_logout = True
c.Spawner.args = ['--allow-root']
c.Spawner.default_url = '/lab'
c.Spawner.notebook_dir = '~/usr/jupyter-notebook'
c.PAMAuthenticator.encoding = 'utf8'
c.Authenticator.admin_users = {'admin', 'root', 'lighthouse'}
c.DummyAuthenticator.password = "1"
c.LocalAuthenticator.create_system_users = True
# c.PAMAuthenticator.admin_groups = {'jupyterhub-users'}
c.LocalAuthenticator.add_user_cmd = ['adduser', '--gecos', '""', '--disabled-password']
c.PAMAuthenticator.open_sessions = False
c.Authenticator.allowed_users = {'admin', 'root', 'lighthouse'}
c.Authenticator.delete_invalid_users = True
I’ve reset add_user_cmd and set open_sessions False, however I can’t login my jupyterhub.
When I log in with admin or lighthouse, I would get [PAM Error 7], when I log in with root, I would get [PAM Error 3].
(jupyter-ai) [root@VM-0-11-centos jupyter-notebook]# jupyterhub
[I 2023-08-08 15:21:11.493 JupyterHub app:2859] Running JupyterHub version 4.0.1
[I 2023-08-08 15:21:11.493 JupyterHub app:2889] Using Authenticator: jupyterhub.auth.PAMAuthenticator-4.0.1
[I 2023-08-08 15:21:11.493 JupyterHub app:2889] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-4.0.1
[I 2023-08-08 15:21:11.493 JupyterHub app:2889] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-4.0.1
[I 2023-08-08 15:21:11.500 JupyterHub app:1664] Loading cookie_secret from /usr/jupyter-notebook/jupyterhub_cookie_secret
[I 2023-08-08 15:21:11.536 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
[I 2023-08-08 15:21:11.569 JupyterHub app:2928] Initialized 0 spawners in 0.002 seconds
[I 2023-08-08 15:21:11.573 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2023-08-08 15:21:11.574 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.seven_days
[I 2023-08-08 15:21:11.574 JupyterHub metrics:278] Found 0 active users in the last ActiveUserPeriods.thirty_days
[W 2023-08-08 15:21:11.575 JupyterHub proxy:746] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2023-08-08 15:21:11.575 JupyterHub proxy:750] Starting proxy @ http://:9000/
15:21:11.792 [ConfigProxy] info: Proxying http://*:9000 to (no default)
15:21:11.793 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[I 2023-08-08 15:21:12.391 JupyterHub app:3178] Hub API listening on http://*:8081/hub/
[I 2023-08-08 15:21:12.391 JupyterHub app:3180] Private Hub API connect url http://VM-0-11-centos:8081/hub/
15:21:12.392 [ConfigProxy] info: 200 GET /api/routes
15:21:12.393 [ConfigProxy] info: 200 GET /api/routes
[I 2023-08-08 15:21:12.393 JupyterHub proxy:477] Adding route for Hub: / => http://VM-0-11-centos:8081
15:21:12.395 [ConfigProxy] info: Adding route / -> http://VM-0-11-centos:8081
15:21:12.395 [ConfigProxy] info: Route added / -> http://VM-0-11-centos:8081
15:21:12.396 [ConfigProxy] info: 201 POST /api/routes/
[I 2023-08-08 15:21:12.396 JupyterHub app:3245] JupyterHub is now running at http://:9000/
[I 2023-08-08 15:21:43.687 JupyterHub log:191] 200 GET /hub/login?next=%2Fhub%2F (@::ffff:122.96.42.30) 18.72ms
[W 2023-08-08 15:22:04.393 JupyterHub auth:1112] PAM Authentication failed (admin@::ffff:122.96.42.30): [PAM Error 7] Authentication failure
[W 2023-08-08 15:22:04.394 JupyterHub base:841] Failed login for admin
[I 2023-08-08 15:22:04.395 JupyterHub log:191] 200 POST /hub/login?next=%2Fhub%2F (@::ffff:122.96.42.30) 1644.96ms
[W 2023-08-08 15:22:21.455 JupyterHub auth:1112] PAM Authentication failed (lighthouse@::ffff:122.96.42.30): [PAM Error 7] Authentication failure
[W 2023-08-08 15:22:21.455 JupyterHub base:841] Failed login for lighthouse
[I 2023-08-08 15:22:21.457 JupyterHub log:191] 200 POST /hub/login?next=%2Fhub%2F (@::ffff:122.96.42.30) 1644.51ms
[W 2023-08-08 15:22:33.600 JupyterHub auth:1112] PAM Authentication failed (root@::ffff:122.96.42.30): [PAM Error 3] Error in service module
[W 2023-08-08 15:22:33.600 JupyterHub base:841] Failed login for root
[I 2023-08-08 15:22:33.602 JupyterHub log:191] 200 POST /hub/login?next=%2Fhub%2F (@::ffff:122.96.42.30) 1624.96ms
What’s wrong with this?