1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/humhub_ynh.git synced 2024-09-03 19:26:11 +02:00
humhub_ynh/conf/ldap.sql

29 lines
883 B
MySQL
Raw Normal View History

BEGIN;
DELETE FROM setting WHERE
(`name` = 'auth.anonymousRegistration') OR
(`name` = 'auth.allowGuestAccess') OR
(`name` = 'auth.internalUsersCanInvite');
INSERT INTO setting (`name`, `value`, `module_id`) VALUES
('enabled', '1', 'ldap'),
('hostname', 'localhost', 'ldap'),
('port', '389', 'ldap'),
('encryption', '', 'ldap'),
('username', '', 'ldap'),
('password', '', 'ldap'),
('baseDn', 'ou=users,dc=yunohost,dc=org', 'ldap'),
('loginFilter', '(uid=%s)', 'ldap'),
('userFilter', 'objectClass=mailAccount', 'ldap'),
('emailAttribute', 'mail', 'ldap'),
('usernameAttribute', 'uid', 'ldap'),
('idAttribute', 'uid', 'ldap'),
('refreshUsers', '1', 'ldap'),
('auth.anonymousRegistration', '0', 'user'),
('auth.allowGuestAccess', '0', 'user'),
('auth.internalUsersCanInvite', '0', 'user');
2021-02-17 23:50:49 +01:00
UPDATE `user` SET `auth_mode` = 'ldap' WHERE `user`.`username` = '__ADMIN__';
COMMIT;