I have an existing openldap authentication database for samba and I would like to be able to bring over both the groups and users to scalix.
I am able to bring over the users and groups fine ... but group membership is an issue.
Here is what a group looks like in openldap:
# sshusers, Groups, example.com
dn: cn=sshusers,ou=Groups,dc=example,dc=com
objectClass: sambaGroupMapping
objectClass: posixGroup
objectClass: scalixUserClass
displayName: sshusers
sambaGroupType: 2
sambaSID: S-1-5-21-3516781642-1962875130-3438800523-3035
description: Users allowed SSH access
gidNumber: 1017
cn: sshusers
memberUid: hughesjr
scalixScalixObject: TRUE
scalixMailnode: mail
scalixEmailAddress: sshusers@crm.example.com
I did this in sync.conf to get the groups to show up on my scalix server when using omldapsync:
EX_BASE2=ou=Groups,dc=example,dc=com
EX_FILTER=(&(cn=*)(|(mail=*)(scalixEmailAddress=*))(|(objectClass=inetOrgPerson)(objectClass=sambaGroupMapping)))
IM_MV_ATTR=objectClass INTERNET-ADDR memberUid
#in the IM_MAPPING_TABLE= entry
memberUid|omMemberForeignAddr|*|*
What I end up with in scalix is this:
cn=sshusers, o=Scalix
cn=sshusers
objectClass=top
objectClass=distributionList
objectClass=mhsDistributionList
objectClass=scalixDistributionList
surname=sshusers
description=Users allowed SSH access
mhsORAddresses=S=sshusers/OU1=mail/CN=sshusers
omInternetAddr=sshusers@crm.example.com
mail=sshusers@crm.example.com
rfc822Mailbox=sshusers@crm.example.com
omAddress=sshusers /mail/CN=sshusers
omMailnode=mail
omCn=sshusers
omForeignAddr=cn=sshusers,ou=Groups,dc=example,dc=com
omGlobalUniqueId=1e250a6e-227e-102b-88d4-fcae9bc2e961
omLocalUniqueId=3504
omAdministeredBy=ldapsync-${2}
So there are no entries for omMemberForeignAddr in the scalix group.
I created a normal scalix group (via sac) called testgroup and assigned my remote user (hughesjr) to it ... it looks like this:
cn=testgroup, o=Scalix
cn=testgroup
objectClass=top
objectClass=distributionList
objectClass=mhsDistributionList
objectClass=scalixDistributionList
surname=testgroup
mhsORAddresses=S=testgroup/OU1=mail/CN=testgroup
omInternetAddr="testgroup" <testgroup@crm.example.com>
mail=testgroup@crm.example.com
rfc822Mailbox=testgroup@crm.example.com
omAddress=testgroup /mail/CN=testgroup
omMailnode=mail
omCn=testgroup
omGlobalUniqueId=08c100003af9d854-352.0.861.291
omLocalUniqueId=7312
These groups are strikingly similar and I notice that the group testgroup does not put it's members in the group definition, but instead puts the group's omLocalUniqueId in the definition for the user.
Is this the required way to get users in a group ... by adding the omLocalUniqueId of the group to the user's entry? Or, would making an entry like "omMemberForeignAddr=hughesjr" in the group definition work.
(this server is Scalix 11 GA, if that makes a difference ... new install, no upgrades)
If omLocalUniqueId is the way, will I have to build some kind of external ldap script to make that happen, or can I do it in the sync.cfg?
if I do modify the local ldap database using omldapmodify to add the proper group omLocalUniqueId to the user, will it work ... and is that the proper way to accomplish this???
----------------------
Another question would be ... can I just grab the groups via ldap (I have authentication working against the ldap server right now) and use those groups to assign permissions to items (like resources, public folders, etc.) ... or do I have to get the groups and memberships into the local LDAP database to do that).