By default, smbldap-populate will add groups 'Domain User' with gidnumber 513, and 'Administrators' with gidnumber 544. This can map with eGroupWare's default groups 'Default' and 'Admins'. On the other hand, smbldap-populate will add default administrator account 'root' with uidnumber 0, where it is invalid for eGroupWare (eGroupWare count account id with AUTO_INCREMENT, where starting from 1 and so 0 is invalid). We need some tricks in order to integrate them:
- Populate default Samba LDAP schema with following command:
smbldap-populate -l 65534 - Create a first smbldap user 'postmaster' with uid 1001.
- Install eGroupWare as usual, use SQL for both user authentication and store/retrieve user accounts.
- Create SQL admin account with username 'postmaster', and "Delete all existing SQL accounts, groups, ACLs and preferences".
- After eGroupWare installation complete, run the following SQL hack from phpmyadmin, in order to update related users and groups record:
-- Update egw_acl 'Default' group related record.
UPDATE egw_acl SET acl_location = -513 WHERE acl_location = -(
SELECT account_id FROM egw_accounts WHERE account_lid = 'Default' AND account_type = 'g'
) AND acl_account > 0;
UPDATE egw_acl SET acl_account = -513 WHERE acl_account = -(
SELECT account_id FROM egw_accounts WHERE account_lid = 'Default' AND account_type = 'g'
);
-- Update egw_acl 'Admins' group related record.
UPDATE egw_acl SET acl_location = -544 WHERE acl_location = -(
SELECT account_id FROM egw_accounts WHERE account_lid = 'Admins' AND account_type = 'g'
) AND acl_account > 0;
UPDATE egw_acl SET acl_account = -544 WHERE acl_account = -(
SELECT account_id FROM egw_accounts WHERE account_lid = 'Admins' AND account_type = 'g'
);
-- Update egw_acl 'postmaster' user related record.
UPDATE egw_acl SET acl_account = 1001 WHERE acl_account = (
SELECT account_id FROM egw_accounts WHERE account_lid = 'postmaster' AND account_type = 'u'
);
-- Update 'Default' group as 'Domain Users' with id 513.
UPDATE egw_accounts SET account_id = 513, account_lid = 'Domain Users' WHERE account_lid = 'Default';
-- Update 'Admins' group as 'Administrators' with id 544.
UPDATE egw_accounts SET account_id = 544, account_lid = 'Administrators' WHERE account_lid = 'Admins';
-- Update 'postmaster' account id as 1001.
UPDATE egw_accounts SET account_id = 1001, account_primary_group = 544 WHERE account_lid = 'postmaster' AND account_type = 'u'; - Go back to eGroupWare setup, switch user authentication and store/retrieve backend as LDAP.
- Login eGroupWare with account 'postmaster'. You should get all required privilege!


















Post new comment