LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-08-2019, 10:06 AM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
additional info: objectClass: value #0 invalid per syntax on slapd Ubuntu 18.04


I'm trying to configure a plain openldap (slapd) on Ubuntu 18.04 and I can't for the life of me get past this error:
Code:
ldap_add: Invalid syntax (21)
	additional info: objectClass: value #0 invalid per syntax
I've searched on the internet, but none of the solutions seemed to help.
I've followed this tutorial (https://computingforgeeks.com/how-to...-ubuntu-18-04/)
I add a file called basedn.ldif containg the following lines:
Code:
dn: ou=people,dc=a,dc=macroscian,dc=com
objectClass: organizatonalUnit
ou: people

dn: ou=groups,dc=a,dc=macroscian,dc=com
objectClass: organizationalUnit
out: groups
Then I run the following command:
ldapadd -x -D cn=admin,dc=a,dc=macroscian,dc=com -W -f basedn.ldif
But I get:
Code:
Enter LDAP Password: 
adding new entry "ou=people,dc=a,dc=macroscian,dc=com"
ldap_add: Invalid syntax (21)
	additional info: objectClass: value #0 invalid per syntax
This guy here (https://serverfault.com/questions/53...d-syntax-error) seems to have a similar problem and his file is also quite simple.
But this
Code:
ldapadd -Y EXTERNAL -H ldapi:// -f /etc/ldap/schema/nis.ldif
didn't help. I changed the path to match mine, as he was pointing to /etc/openldap, which I think is the Centos version.
But this outputs:
Code:
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
adding new entry "cn=nis,cn=schema,cn=config"
ldap_add: Other (e.g., implementation specific) error (80)
	additional info: olcAttributeTypes: Duplicate attributeType: "1.3.6.1.1.1.1.2"
So it basically doesn't change anything, as far as I understand.
 
Old 05-08-2019, 10:19 AM   #2
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Original Poster
Rep: Reputation: 103Reputation: 103
Great, so I followed the advice of of another guy, who said that vim was creating some additional characters. I deleted the file and added the same information with nano and it worked directly. I don't understand what the hell vim is inserting that ldap doesn't like. It would be nice to see. Obviously there were no visible characters, :set list didn't show anything weird.
 
  


Reply

Tags
ldap, slapd, ubuntu 18.04



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenLdap additional info:objectClass value#0 invalid per syntax hack3rcon Linux - Server 4 05-14-2019 06:02 AM
[SOLVED] ldap_bind: Invalid DN syntax (34) additional info: invalid DN eswar425 Linux - Newbie 1 01-01-2014 10:08 AM
Slapd.conf removed- Where do I edit in slapd.d DIT for same info? dman777 Linux - Server 1 03-12-2012 03:47 AM
What is the connection between slapd.conf and the slapd.d bangshws Linux - Server 1 10-13-2011 06:27 AM
ldap cannot carry slapd.conf changes or did not use /etc/openldap/slapd.conf joel_saul Linux - Server 6 08-21-2010 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration