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

How to modify the schema to allow empty groups on groupOfUniqueNames #619

Open
peracchi opened this issue Apr 26, 2022 · 0 comments
Open

Comments

@peracchi
Copy link

I'm "almost there" with my own openldap image!

The problem at the moment is that the LDIF file that I want to import has several empty groups.

Because the member or uniqueMember attributes are MUST instead of MAY, entries using these objectclasses MUST have at least 1 member or uniqueMember value or they will violate the schema. In other words, empty groups are not allowed.

There are 2 simple workarounds:

Option 1. Add a member (or uniqueMember) to the empty group
Option 2. Modify the schema to allow empty groups

I would like to use the second option but could not implement the solution as presented on the link bellow:

Schema Violation While Updating Optional Group Attributes

The best I got was use the following LDIF:

# for groupOfUniqueNames
dn: cn={0}core,cn=schema,cn=config
changetype: modify
replace: olcObjectClasses
olcObjectClasses: ( 2.5.6.17 NAME 'groupOfUniqueNames'
  DESC 'Defines entries for a group of names. Represents a
  list containing an unordered list of names' SUP 'top'
  STRUCTURAL MUST ( cn )
  MAY ( uniqueMember $ businessCategory $ seeAlso $
  owner $ ou $ o $ description ) )

With this command:
ldapmodify -x -H ldaps://ldap.example.com -D "cn=admin,cn=config" -w <config-pwd> -f change-groupOfUniqueNames.ldif

Then I can import empty groups.

But I am doing something wrong because LDAP gets "corrupted".

Trying to view things in phpLDAPadmin gives a pop-up (on Firefox) saying "There was a problem with the request." and the panel on the right keeps that "animation" on "Retrieving DN...".

Any ideas on what I am doing wrong and how to get it right?

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

1 participant