From b0ad058e6d1001b9dc2aad73b1bbc511ccc08420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Fri, 16 May 2014 18:48:40 +0200 Subject: [PATCH] [fix] Instantiate authenticator for a yolo postinstall --- tools.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools.py b/tools.py index 3473173be..68de63ced 100644 --- a/tools.py +++ b/tools.py @@ -188,6 +188,8 @@ def tools_postinstall(domain, password, dyndns=False): password -- YunoHost admin password """ + from moulinette.core import init_authenticator + from yunohost.backup import backup_init from yunohost.app import app_ssowatconf @@ -261,6 +263,13 @@ def tools_postinstall(domain, password, dyndns=False): raise MoulinetteError(errno.EPERM, m18n.n('yunohost_ca_creation_failed')) + # Instantiate LDAP Authenticator + auth = init_authenticator(('ldap', 'default'), + { 'uri': "ldap://localhost:389", + 'base_dn': "dc=yunohost,dc=org", + 'user_rdn': "cn=admin" }) + auth.authenticate('yunohost') + # Initialize YunoHost LDAP base tools_ldapinit(auth)