You might want to override Spawner.start to do the actions you are looking
for when a user’s server starts.

from jupyterhub.spawner import LocalProcessSpawnerclass
MySpawner(LocalProcessSpawner):
    def start(self):
        setup_home_directory(self.user.name) # < define this function
        return super().start()

c.JupyterHub.spawner_class = MySpawner

-Min
​

On Thu, Oct 27, 2016 at 7:01 AM, Jori Mäntysalo <[email protected]>
wrote:

> I want to authenticate over LDAP and use Sagemath as a kernel.
>
> Is it possible to hook automatic home directory creation to LDAP
> authenticator? From uid LDAP will give home directory, usually
> /home/staff/uid or /home/stud/uid. I would like to have all Sage data
> located on same Sage server, so that login with new uid would create
> /home/uid.
>
> (Later I want to have both LDAP and local accounts available, so that the
> system would behave like SageNB works now.)
>
> --
> Jori Mäntysalo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAHNn8BX3sEnqn%2Brp5VkTu7d7WmhjbjELCZKeYtMr1PKaNOF4-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to