OpenLDAP cannot add new schema
Try
ldapadd -Q -Y EXTERNAL -H ldapi:/// -f filesystem.ldif
This will only work if you work as root (uid=0) or via sudo and on the LDAP server direct. It connects to the LDAP server based on the user id and bypasses the normal auth methods.
This access is granted by the olcAccess
rule
{0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" manage by * none
in olcDatabase={0}config,cn=config
.
To allow access in the "normal" way, you can add the following lines to olcDatabase={0}config,cn=config
:
olcRootDN: cn=admin,cn=config
olcRootPW: <yourpassword>
where <yourpassword>
should be pre-encrypted via slappasswd
.