Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openchange provision error #404

Open
martinsimovic opened this issue Oct 20, 2015 · 4 comments
Open

openchange provision error #404

martinsimovic opened this issue Oct 20, 2015 · 4 comments

Comments

@martinsimovic
Copy link

When I try to provision openchange I get the following error:

root@pdc:~# openchange_provision --ignore-already-exists --standalone
NOTE: This operation can take several minutes
[+] Step 1: Register Exchange OIDs
[+] Step 2: Add Exchange attributes to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_attributes.ldif
[+] Step 3: Add Exchange auxiliary classes to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_auxiliary_class.ldif
[+] Step 4: Add Exchange objectCategory to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_objectCategory.ldif
[+] Step 5: Add Exchange containers to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_container.ldif
[+] Step 6: Add Exchange sub containers to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_subcontainer.ldif
[+] Step 7: Add Exchange CfgProtocol subcontainers to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_sub_CfgProtocol.ldif
[+] Step 8: Add Exchange mailGateway subcontainers to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_sub_mailGateway.ldif
[+] Step 9: Add Exchange classes to Samba schema
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema.ldif
[+] Step 10: Add possSuperior attributes to Exchange classes
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_possSuperior.ldif
[+] Step 11: Extend existing Samba classes and attributes
No elements to add found in /usr/share/samba/setup/AD/oc_provision_schema_modify.ldif
[+] Step 12: Generic Exchange configuration objects
No elements to add found in /usr/share/samba/setup/AD/oc_provision_configuration.ldif
[+] Step 13: Exchange Organization objects
Error: "(64, 'structural objectClass msExchAdminGroup is not a valid child class for CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=example,DC=com')" when adding element:

First Administrative Group

dn: CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=example,DC=com
objectClass: top
objectClass: msExchAdminGroup
cn: First Administrative Group
distinguishedName: CN=First Administrative Group,CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=example,DC=com
displayName: First Administrative Group
showInAdvancedViewOnly: TRUE
siteFolderGUID: 4b2d197b-1cb3-486a-b8c3-42e8c5c08e27
name: First Administrative Group
legacyExchangeDN: /o=First Organization/ou=First Administrative Group
objectCategory: CN=ms-Exch-Admin-Group,CN=Schema,CN=Configuration,DC=example,DC=com
msExchAdminGroupMode: 0
msExchDefaultAdminGroup: TRUE

I am unable to proceed with provision nor deprovision neither, stuck halfway through. Using Inverse packages:

ii samba 2:4.1.18+dfsg-3~inverse1
ii openchangeserver 3:2.4-zentyal6

@martinsimovic
Copy link
Author

Just tried the same with samba version 3:4.1.17+dfsg-1~zentyal4 and openchange 3:2.4-zentyal9 from Zentyal repository - same error message.

@theroch
Copy link

theroch commented Mar 23, 2016

I had exactly the same problem and it took me 4 days until I solved the problem.

The Problem:
The error message structural objectClass msExchAdminGroup is not a valid child class for CN = Administrative Groups, CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = example, DC = com indicates that your scheme was not created correctly.
The issue seems not to be in Samba but probably on provision process of OpenChange.
The algorithm to check for existing scheme seems to not work correctly.
For me, the scheme has been installed correctly up to and including step 9. But for all further steps the schema elements were missing, although OpenChange considered they as installed.
I've tried also the last master branch 03bae8f with the same issue.

To Fix this:
You should look randomly to the elements in the schema to find the missing elements. Use the LDIF files under setup/AD as reference. Copy the concerned files to /tmp and replace the ${} variables with your AD structure. Then install the appropriate elements by hand using ldbmodify for Samba.
After that the provision of OpenChange run without problems.

@theroch
Copy link

theroch commented Mar 23, 2016

I think I found the bug:
Line 241 in python/openchange/provision.py

if ignore_already_exists and exists_dn(sam_db, dn):
    # TODO: check that the existent element has correct values
    continue
elements_to_add.append(element)

The expression ignore_already_exists and exists_dn(sam_db, dn) is the problem.
Step 10 and 11 are modify steps, so exists_dn(sam_db, dn) is always true and the modifications are never installed.
Maybe ignore_already_exists and exists_dn(sam_db, dn) and not modify_mode is a workaround.
But the check process should be more complex to avoid further problems.

@theroch
Copy link

theroch commented Aug 16, 2016

The workaround doesn't work in step 10 and 11 of provisioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants