-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to initialize UNIX system users - is there a LocalNativeAuthenticator? #75
Comments
Hi @odovad sorry for the delay. I don't think we have |
Initializing users is not behind any authentication, to create them I used a small script, maybe it is useful to someone else.
|
I have same issue.Since nativeauthenticator doesn't inherit I solve it by setting config for example from subprocess import check_call
def create_system_user(spawner):
username = spawner.user.name
check_call(['bash', '/srv/jupyterhub/adduser.sh', username])
c.Spawner.pre_spawn_hook = create_system_user adduser.sh code adduser -q --gecos '""' --home /home/$1 --disabled-password $1 || "True" It will create system user if user not exists, otherwise return do nothing |
Running jupyterhub inside docker with def create_system_user(spawner):
"""Hook to create system user before spawning notebook. Required since NativeAuthenticator does not create users."""
username = spawner.user.name
check_call(['useradd', username, "-m"])
c.Spawner.pre_spawn_hook = create_system_user |
Hi,
Maybe there are some elements I don't understand...
I had to signup with my already existing admin user to be able to login.
When I create a user with the admin panel, I have an error 500 because the nativeauthenticator.NativeAuthenticator does not allow to pass an option like : c.LocalAuthenticator.create_system_users = True
/home/{new_user} is not created.
Am I missing someting ?
Thanks in advance :)
The text was updated successfully, but these errors were encountered: