[commits] [Wiki] changed: GroupLdapMigration
Wiki Guest
wikiguest at horde.org
Fri Mar 1 12:37:02 UTC 2019
guest [95.90.223.65] Fri, 01 Mar 2019 12:37:02 +0000
Modified page: https://wiki.horde.org/GroupLdapMigration
New Revision: 3
Change log: Add SQL queries for fixing shares
@@ -26,14 +26,193 @@
For each found table,
For each group_uid which is numeric, look up the group name
-mysql> select group_name from horde_groups where group_uid=N;
+and build a query to create a corresponding entry with the same perms.
+
+++++ KRONOLITH
+
+select DISTINCT CONCAT(
+"INSERT INTO kronolith_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+", ",
+perm_1024,
+");"
+)
+as query from kronolith_sharesng_groups, horde_groups
+WHERE kronolith_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND kronolith_sharesng_groups.group_uid=horde_groups.group_uid;
+
+
+++++ NAG
+
+select DISTINCT CONCAT(
+"INSERT INTO nag_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from nag_sharesng_groups, horde_groups
+WHERE nag_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND nag_sharesng_groups.group_uid=horde_groups.group_uid;
+
+++++ ansel
+
+select DISTINCT CONCAT(
+"INSERT INTO ansel_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from ansel_sharesng_groups, horde_groups
+WHERE ansel_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND ansel_sharesng_groups.group_uid=horde_groups.group_uid;
+
+
+++++ gollem
+
+
+select DISTINCT CONCAT(
+"INSERT INTO gollem_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from gollem_sharesng_groups, horde_groups
+WHERE gollem_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND gollem_sharesng_groups.group_uid=horde_groups.group_uid;
+
+++++ ingo
+
+select DISTINCT CONCAT(
+"INSERT INTO ingo_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from ingo_sharesng_groups, horde_groups
+WHERE ingo_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND ingo_sharesng_groups.group_uid=horde_groups.group_uid;
+
+++++ mnemo
+
+select DISTINCT CONCAT(
+"INSERT INTO mnemo_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from mnemo_sharesng_groups, horde_groups
+WHERE mnemo_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND mnemo_sharesng_groups.group_uid=horde_groups.group_uid;
+
+
+++++ turba
+
+select DISTINCT CONCAT(
+"INSERT INTO turba_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from turba_sharesng_groups, horde_groups
+WHERE turba_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND turba_sharesng_groups.group_uid=horde_groups.group_uid;
+
+++++ whups
+
+select DISTINCT CONCAT(
+"INSERT INTO whups_sharesng_groups VALUES(",
+share_id,
+", \"cn=",
+horde_groups.group_name,
+",ou=hordegroups,dc=domain,dc=com\"",
+", ",
+perm_2,
+", ",
+perm_4,
+", ",
+perm_8,
+", ",
+perm_16,
+");"
+)
+as query from whups_sharesng_groups, horde_groups
+WHERE whups_sharesng_groups.group_uid REGEXP "^^[0-9]+$"
+AND whups_sharesng_groups.group_uid=horde_groups.group_uid;
-Find the corresponding ldap group id, for example
-GroupName,ou=hordegroups,dc=domain,dc=com
-Create a corresponding entry with the same perms.
+++ Cache
More information about the commits
mailing list