LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 10-12-2011, 02:24 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 103

Rep: Reputation: Disabled
ldap add invalid syntax


Hi,

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
mail: itadmin@example.com
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, 02:30 AM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
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 02:33 AM.
 
Old 10-13-2011, 01:40 AM   #3
said76
Member
 
Registered: Aug 2011
Posts: 103

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
mail: itadmin@example.com
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
 
  


Reply


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


All times are GMT -5. The time now is 12:13 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration