Open astratto opened 10 years ago
Can you show me how you're building Ladle::Server
?
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
@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.
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.
Running into the same issue. @rsutphin any thoughts on how to accomplish this? Thanks!
@silarsis perhaps you might be able to assist?
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: 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
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:
but it fails with:
Any ideas?
Thanks