Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-12-2011, 01:24 AM   #1
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
ldap add invalid syntax


I was wondering if I could get some help with LDAP query.

I am getting error message as follows

ldap_add: Invalid syntax (21)
additional info: objectClass: value #0 invalid per syntax

Here is my ldif
dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
ou: groups

dn: uid=itpeople,ou=groups,dc=example,dc=com
objectClass: ldapgroup
objectClass: inetOrgPerson
objectClass: posixAccount
cn: ITPeople
uid: itpeople
member: uid=sarah.parker,ou=accounts,dc=example,dc=com
member: uid=samantha.fields,ou=accounts,dc=example,dc=com

In my accounts.ldif
dn: uid=sarah.parker,ou=accounts,dc=example,dc=com
objectClass: person
objectClass: posixAccount
cn: Sarah Parker
sn: Parker
uid: sarah.parker
userPassword: xxx

Any help would be greatly appreciated.

Thank you
Old 10-12-2011, 01:30 AM   #2
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 219Reputation: 219Reputation: 219
What is the query you are entering to illicit the error?

Check for trailing spaces in your "objectClass:" lines.

Last edited by foodown; 10-12-2011 at 01:33 AM.
Old 10-13-2011, 12:40 AM   #3
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thanks for your reply.

I made sure there is no trailing space or misspelled to the word objectClass. It's all good.

Anyway, I did it differently again, and
dn: uid=itpeople,ou=groups,dc=example,dc=com
#objectClass: ldapgroup
objectClass: inetOrgPerson
objectClass: posixGroup
cn: ITPeople
uid: itpeople
member: uid=sarah.parker,ou=accounts,dc=example,dc=com
member: uid=samantha.fields,ou=accounts,dc=example,dc=com

I got the following error:
ldap_add: Object class violation (65)
additional info: invalid structural object class chain (inetOrgPerson/posixGroup)

I suppose, I can not have inetOrgPerson and posixGroup together. I guess what I am trying to do here is to set up a group distribution for my Postfix SMTP. I am at the moment at a loss but keep trying to google for it.

Thank you


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ldap_add:Invalid Syntax Error (23) donanap Linux - General 3 09-07-2011 09:33 AM
[python] syntax Error : invalid syntax Python_user Programming 2 09-06-2009 12:52 PM
LDAP Problem Invalid DN Syntax (34) steve007 Linux - Newbie 3 08-24-2009 07:53 AM
[Python] Invalid Syntax - If statement LinuxCrayon Programming 4 12-07-2007 09:11 AM
LDAP Problem Invalid DN syntax (34) steve007 Linux - Newbie 3 10-18-2005 05:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 AM.

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