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

Enabling NIS schema #19

Open
astratto opened this issue Jul 25, 2014 · 7 comments
Open

Enabling NIS schema #19

astratto opened this issue Jul 25, 2014 · 7 comments

Comments

@astratto
Copy link

Hi,

I need to enable the NIS schema and, according to ApacheDS documentation, I just need to modify the m-disabled attribute.

I tried starting Ladle with an LDIF file containing my data and these lines at the top:

dn: cn=nis,ou=schema
changetype: modify
replace: m-disabled
m-disabled: FALSE
-

other_stuff_here

but it fails with:

ApacheDS: ERROR: ERR_12004_CHANGE_NOT_ALLOWED We cannot have changes when reading a file which already contains entries
ApacheDS process failed: FATAL: ERR_12005_NO_CHANGE No changes within entries
ApacheDS: java.util.NoSuchElementException: ERR_12005_NO_CHANGE No changes within entries
...

Any ideas?

Thanks

@rsutphin
Copy link
Contributor

Can you show me how you're building Ladle::Server?

@cherweg
Copy link

cherweg commented Feb 19, 2015

Hi. Any suggestions/examples how to enable the nis Schema at startup?
I have the same problem like astratto.
in my spec test i initilize like this:

 before :all do
    @ldap_server = Ladle::Server.new(
    :port => 3897,
    :ldif => "./spec/support/my.ldif",
    :custom_schemas => "./spec/support/my_schema.ldif",
    :domain => "dc=my,dc=domain,dc=de",
    :tmpdir => Dir.tmpdir()
  )
    @ldap_server.start
  end

in my.ldif i have tried to do:

  dn: cn=nis,ou=schema
  changetype: modify
  replace: m-disabled
  m-disabled: FALSE
  -
[...]
dn: uid=tester,ou=tester,ou=people,dc=my,dc=domain,dc=de
objectClass: top
objectClass: person
objectClass: posixAccount
objectClass: organizationalPerson
objectClass: ldapPublicKey
objectClass: inetOrgPerson
cn: Max Mustermann
[...]

results in:

Starting server on 3897
ApacheDS: ERROR: ERR_12004_CHANGE_NOT_ALLOWED We cannot have changes when reading a file which already contains entries
ApacheDS process failed: FATAL: ERR_12005_NO_CHANGE No changes within entries
ApacheDS: java.util.NoSuchElementException: ERR_12005_NO_CHANGE No changes within entries
ApacheDS:   at org.apache.directory.api.ldap.model.ldif.LdifReader.nextInternal(LdifReader.java:1793)
ApacheDS:   at org.apache.directory.api.ldap.model.ldif.LdifReader.access$100(LdifReader.java:168)
ApacheDS:   at org.apache.directory.api.ldap.model.ldif.LdifReader$1.next(LdifReader.java:1892)
ApacheDS:   at org.apache.directory.api.ldap.model.ldif.LdifReader$1.next(LdifReader.java:1883)
ApacheDS:   at net.detailedbalance.ladle.Server.loadLDIF(Server.java:194)
ApacheDS:   at net.detailedbalance.ladle.Server.start(Server.java:162)
ApacheDS:   at net.detailedbalance.ladle.Main.main(Main.java:64)

regards
Christian

@astratto
Copy link
Author

@rsutphin I'm sorry, but somehow I missed your reply...

Basically I was doing what @cherweg is doing now.
If I recall correctly I needed to enable other object classes (i.e., posix*) and I tried to pass a custom schema, that didn't work and I narrowed down the issue to the fact that it doesn't accept an LDIF that changes the schema.

@LorenzBischof
Copy link

LorenzBischof commented Apr 30, 2016

Any progress on this? I would really like to use object classes from the nis schema like posixaccount etc.

edit: is there anyway to load it? I found an xml online but that doesn't seem to work and I don't know how to convert it.

@gtorre
Copy link

gtorre commented Jul 20, 2016

Running into the same issue. @rsutphin any thoughts on how to accomplish this? Thanks!

@gtorre
Copy link

gtorre commented Jul 22, 2016

@silarsis perhaps you might be able to assist?

@cherweg
Copy link

cherweg commented Aug 8, 2016

Hey Folks,
sorry for my late response...
I solved my problem by updating the cn=nis.ldif inside the apacheds-all-2.0.0-M16.jar:

`diff cn=nis.ldif.enabled cn=nis.ldif
4c4

< m-disabled: FALSE

m-disabled: TRUE`

You could unzip the jar, change that file (apacheds-all-2.0.0-M16.jar/schema/ou=schema/cn=nis.ldif) and zip it again (as a jar file).

Perhaps somebody could release a new Version of ladle with an updated jar?

regards
Christian

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

5 participants