Open mwienhold opened 3 years ago
Having the same error. Did you find a solution? My log output with custom printing in schemas-to-ldif.sh below.
Server starts but custom attributetypes and objectclasses seems not to be added. If I add objects with my ldif file I get, as you also get:
openldap | ldap_add: Invalid syntax (21)
openldap | additional info: objectClass: value #2 invalid per syntax
*** CONTAINER_LOG_LEVEL = 3 (info)
*** Search service in CONTAINER_SERVICE_DIR = /container/service :
*** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*** link /container/service/slapd/startup.sh to /container/run/startup/slapd
*** link /container/service/slapd/process.sh to /container/run/process/slapd/run
*** Set environment for startup files
*** Environment files will be proccessed in this order :
Caution: previously defined variables will not be overriden.
/container/environment/99-default/default.startup.yaml
/container/environment/99-default/default.yaml
To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
*** Running /container/run/startup/:ssl-tools...
*** Running /container/run/startup/slapd...
openldap user and group adjustments
get current openldap uid/gid info inside container
-------------------------------------
openldap GID/UID
-------------------------------------
User uid: 911
User gid: 911
uid/gid changed: false
-------------------------------------
updating file uid/gid ownership
Database and config directory are empty...
Init new ldap server...
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.50+dfsg-1~bpo10+1... done.
Creating initial configuration... done.
Creating LDAP directory... done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of restart.
Start OpenLDAP...
Waiting for OpenLDAP to start...
Started!
Add bootstrap schemas...
Converting /container/service/slapd/assets/config/bootstrap/schema/custom/RHDS.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/dhcp.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/dnszone.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/mail.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/mmc.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/openssh-lpk.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/quota.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/radius.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/samba.schema
Converting /container/service/slapd/assets/config/bootstrap/schema/mmc/zarafa.schema
config file testing succeeded
Schemas /container/service/slapd/assets/config/bootstrap/schema/custom/RHDS.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/dhcp.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/dnszone.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/mail.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/mmc.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/openssh-lpk.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/quota.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/radius.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/samba.schema /container/service/slapd/assets/config/bootstrap/schema/mmc/zarafa.schema
----\n /container/service/slapd/assets/config/bootstrap/schema/custom/RHDS.schema\n -rwxr-xr-x 1 openldap openldap 72844 Jan 12 07:32 /container/service/slapd/assets/config/bootstrap/schema/custom/RHDS.schema RHDS.ldif
RHDS.ldif
/tmp/tmp.rrbZ1kGAKi
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
sed: can't read RHDS.ldif: No such file or directory
mv: cannot stat 'RHDS.ldif': No such file or directory
----\n /container/service/slapd/assets/config/bootstrap/schema/mmc/dhcp.schema\n -rw-rw-r-- 1 openldap openldap 23903 Jun 15 2020 /container/service/slapd/assets/config/bootstrap/schema/mmc/dhcp.schema dhcp.ldif
dhcp.ldif
/tmp/tmp.rrbZ1kGAKi
----\n /container/service/slapd/assets/config/bootstrap/schema/mmc/dnszone.schema\n -rw-rw-r-- 1 openldap openldap 5705 Jun 15 2020 /container/service/slapd/assets/config/bootstrap/schema/mmc/dnszone.schema dnszone.ldif
dnszone.ldif
/tmp/tmp.rrbZ1kGAKi
----\n /container/service/slapd/assets/config/bootstrap/schema/mmc/mail.schema\n -rw-rw-r-- 1 openldap openldap 3935 Jun 15 2020 /container/service/slapd/assets/config/bootstrap/schema/mmc/mail.schema mail.ldif
mail.ldif
/tmp/tmp.rrbZ1kGAKi
----\n /container/service/slapd/assets/config/bootstrap/schema/mmc/mmc.schema\n -rw-rw-r-- 1 openldap openldap 1049 Jun 15 2020 /container/service/slapd/assets/config/bootstrap/schema/mmc/mmc.schema mmc.ldif
mmc.ldif
/tmp/tmp.rrbZ1kGAKi
----\n /container/service/slapd/assets/config/bootstrap/schema/mmc/openssh-lpk.schema\n -rw-rw-r-- 1 openldap openldap 535 Jun 15 2020 /container/service/slapd/assets/config/bootstrap/schema/mmc/openssh-lpk.schema openssh-lpk.ldif
Ok, found the other thread. Problem that the filename of your custom schema files can not contain any upper case letters. Renamed: RHDS.schema -> rhds.schema. Seems to work.
Hello!
I am trying to set up an Openldap server with an extension to the attribute types of a custom object class
customPerson
:customPerson.schema
:When I run
docker-compose
my custom schema seems to be converted, but afterwards the generated ldif file can not be found.docker-compose.yml
:Docker's logs:
Am I missing something?
Thank you!