-
Notifications
You must be signed in to change notification settings - Fork 69
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
NativeAuthenticator doesn't work with LocalProcessSpawner #105
Comments
I'm sorry it is not clear to me what you are trying to do. If you are trying to keep the info, couldn't you keep the |
Essentially the issue is that users are being created and authenticated using the NativeAuthenticator (and thus the db), but are not being created on the machine actually running jupyter hub. Causing a failure when the process spawner tries to spawn a process for a new user (that user being present in the db, but absent in the /etc/passwd of the machine itself) Is that clearer? Let me know what I'm glossing over please! 🙏😊 |
Same problem here! The users are only allowed to read directories if they are in a group of the system (i.e. jupyterhub). As users are stored in a DB the system can't find them. There's any approach to automatically create users on machine (i.e. adduser) when they are authorized by the admin? P.S.: I'm proud to see Brazilians projects! Como brasileiro fico feliz de verdade, continue o bom trabalho :) |
See jupyterhub/jupyterhub#2948 for some discussion. I think we want a from jupyterhub.auth import LocalAuthenticator
class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator):
pass that allows the creation of system users so that NativeAuth can be used with spawners that require local users (systemd, default, sudo, etc.) |
We do have some confusing naming conventions here - We should also cover in the docs that NativeAuthenticator cannot be used with the default Spawner, and make sure to get the quickstart docs to result in running servers, which they do not currently due to the implicit use of default Spawner. The alternative is to use pre_spawn hooks to implement something like what we do in tljh to create prefixed users only for the lifetime of the server. |
The above mentioned custom class can be directly entered in the config file: c.Authenticator.admin_users = {'admin'}
c.Authenticator.open_signup = True
c.LocalAuthenticator.create_system_users = True
from jupyterhub.auth import LocalAuthenticator
from nativeauthenticator import NativeAuthenticator
class LocalNativeAuthenticator(NativeAuthenticator, LocalAuthenticator):
pass
c.JupyterHub.authenticator_class = LocalNativeAuthenticator
c.Spawner.default_url = '/lab' |
Due to the limitations mentioned here, is the nativeauthenticator expected to work with the little jupyter hub? I'm was using the great features provided by NativeAuthenticator for months till suddenly the login page started to cause Details are here: jupyterhub/the-littlest-jupyterhub#631 |
After this i am getting this error and also new server is not spawning for the user that i am creating on the system as well. |
@shreeishitagupta |
@lambdaTotoro Yes that i understood. Even if i myself add a system user i am not able to spawn jupyter server for that user getting this only after logging in |
That might still be a problem with root/user permissions. As I understand it, the default setup in pretty much anything jupyterhub expects that jupyterhub is being run as root, not a normal user. There's ways to set it up, but they require some more work. But that is not a question that concerns nativeAuthenticator, so I'd try the jupyterhub repository (where similar problems have been discussed in the past, for example in jupyterhub/jupyterhub#1527) or their discourse page. |
I'll close this issue, the current documentation for self-approval has a way to automatically create system accounts for users when they login. |
My use case:
NativeAuthenticator
as my persisted user/user_info store to solve that 👆problemThe problem:
Error Message:
Error in Authenticator.pre_spawn_start: KeyError "getpwnam(): name not found
The text was updated successfully, but these errors were encountered: