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

[bug] new line character at the end of LDIF template and then you cannot add new users #132

Open
pedro-nonfree opened this issue Mar 6, 2020 · 2 comments
Labels
good first issue Good for newcomers

Comments

@pedro-nonfree
Copy link

pedro-nonfree commented Mar 6, 2020

I spent 7 hours and 10 minutes finding a surreal bug, the LDIF template must be trimmed appropiately

I had one environment working and the other one no (error text=: empty AttributeDescription)

The faulty LDIF template was:

dn: uid={UID},ou=users,{BASE}
objectClass: inetOrgPerson
uid: {UID}
displayName: {UID}
cn: {UID}
sn: {UID}
userPassword: {PWD}

the good one

dn: uid={UID},ou=users,{BASE}
objectClass: inetOrgPerson
uid: {UID}
displayName: {UID}
cn: {UID}
sn: {UID}
userPassword: {PWD}

the patch

dn: uid={UID},ou=users,{BASE}
objectClass: inetOrgPerson
uid: {UID}
displayName: {UID}
cn: {UID}
sn: {UID}
userPassword: {PWD}
-

the error was the last newline character that generated a new attribute list item without anything on it, and that made slapd to protest saying text=: empty AttributeDescription

empty-attributedescription

@blizzz blizzz added the good first issue Good for newcomers label Mar 10, 2020
@qbussrl
Copy link

qbussrl commented Mar 17, 2020

Hello, I have the same issue. I use samba domain controller as ldap server. I am able to connect nextcloud to the ldap server and use ldap users whitin nextcloud. I want to be able to create and manage ldap users from nextcloud using the ldap_write support extension but also using your solution i get the error message.

@battosai30
Copy link

battosai30 commented Dec 2, 2020

Oh god you saved my day ! I was having the same bug I was getting crazy ...

In logs : "Exception: Cannot create user: Undefined attribute type"

In user creation panel : pop-up "Bad request"

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants