LinuxQuestions.org
Help answer threads with 0 replies.
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 10-29-2013, 06:20 AM   #1
tuananhk53
LQ Newbie
 
Registered: Oct 2013
Location: Hanoi Vietnam
Posts: 26

Rep: Reputation: Disabled
ldap_add: Invalid syntax(21)


hi,
i have an error when i add an user to slapd
Code:
ldap_add: Invalid syntax(21)
additional info: objectClass: value #0 invalid per syntax
Here is file .ldif
Code:
dn: uid=tuananh,cn=Manager,dc=example,dc=com
uid: tuananh
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: 123456
shadowLastChange: 15418
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 501
gidNumber: 100
homeDirectory: /home/tuananh

and file slapd.conf
Code:
include         /usr/local/etc/openldap/schema/core.schema
pidfile         /usr/local/var/run/slapd.pid
argsfile        /usr/local/var/run/slapd.args
database        bdb
suffix          "dc=example,dc=com"
rootdn          "cn=Manager,dc=example,dc=com"
rootpw          123456
directory       /usr/local/var/openldap-data

i guess objectClass: account is not avaible in file core.schema, but i'm not sure

sorry if this problem is older
 
Old 10-30-2013, 03:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
i guess objectClass: account is not avaible in file core.schema, but i'm not sure
You need to include both cosine.schema and nis.schema given the objectclasses you're using. See this for details

Also the initial dn (dn: uid=tuananh,cn=Manager,dc=example,dc=com) looks wrong. It should be something like
Code:
dn: cn=tuananh,dc=example,dc=com
 
Old 10-30-2013, 05:21 AM   #3
tuananhk53
LQ Newbie
 
Registered: Oct 2013
Location: Hanoi Vietnam
Posts: 26

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
You need to include both cosine.schema and nis.schema given the objectclasses you're using. See this for details

Also the initial dn (dn: uid=tuananh,cn=Manager,dc=example,dc=com) looks wrong. It should be something like
Code:
dn: cn=tuananh,dc=example,dc=com
hi, thanks for bathory
 
  


Reply



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

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

All times are GMT -5. The time now is 02:27 PM.

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