mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Instantiate authenticator for a yolo postinstall
This commit is contained in:
parent
1edfc50c7f
commit
b0ad058e6d
1 changed files with 9 additions and 0 deletions
9
tools.py
9
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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue