update user_ldap config without creating dupplicate, and default to disable tls

master
Daniel Berteaud 12 years ago
parent f211f5ede4
commit 3c4964b69e
  1. 44
      root/etc/e-smith/templates/etc/e-smith/sql/init/ownclouddb

@ -54,27 +54,29 @@ wget -O /dev/null --no-check-certificate https://$SystemName.$DomainName/ownclou
USE $db; USE $db;
REPLACE INTO appconfig (appid, configkey, configvalue) VALUES ALTER IGNORE TABLE appconfig ADD UNIQUE KEY (appid,configKey);
('user_ldap', 'ldap_base', '$ldapBase'),
('user_ldap', 'ldap_base_groups', 'ou=Groups,$ldapBase'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_base','$ldapBase') ON DUPLICATE KEY UPDATE configValue='$ldapBase';
('user_ldap', 'ldap_base_users', 'ou=Users,$ldapBase'); INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_base_users','ou=Users,$ldapBase') ON DUPLICATE KEY UPDATE configValue='ou=Users,$ldapBase';
INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_base_groups','ou=Groups,$ldapBase') ON DUPLICATE KEY UPDATE configValue='ou=Groups,$ldapBase';
INSERT IGNORE INTO appconfig (appid, configkey, configvalue) VALUES INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','enabled','yes') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'enabled', 'yes'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_cache_ttl','1') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_cache_ttl', '1'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_email_attr','mail') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_display_name', 'uid'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_group_display_name','cn') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_email_attr', 'mail'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_user_display_name','cn') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_group_display_name', 'cn'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_group_filter','objectClass=mailboxRelatedObject') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_group_filter', 'objectClass=mailboxRelatedObject'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_group_member_assoc_attribute','memberUid') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_group_member_assoc_attribute', 'memberUid'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_host','127.0.0.1') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_host', '127.0.0.1'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_tls','0') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_login_filter', 'uid=%uid'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_login_filter','uid=%uid') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_userlist_filter', 'objectClass=sambaSamAccount'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','user_ldaplist_filter','objectClass=sambaSamAccount') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'ldap_uuid_attribute', 'entryuuid'), INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','ldap_uuid_attribute','entryuuid') ON DUPLICATE KEY UPDATE configValue=configValue;
('user_ldap', 'types', 'authentication'); INSERT INTO appconfig (appid,configKey,configValue) VALUES ('user_ldap','types','authentication') ON DUPLICATE KEY UPDATE configValue=configValue;
UPDATE IGNORE group_user group_user SET uid='admin' where uid='owncloud'; ALTER TABLE appconfig DROP INDEX appid;
UPDATE IGNORE group_user SET uid='admin' where uid='owncloud';
DELETE FROM users where uid='owncloud'; DELETE FROM users where uid='owncloud';

Loading…
Cancel
Save