adding user ldif to ldap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



hi list.. I am trying to add an ldif with my users that I have derived
from /etc/passwd. for some reason ldapadd is choking on the first
entry... I've also tried removing the first one and predictably each
one fails in exactly the same way...may I ask how best to correct
this?


Here is the error:

LDAP# ldapadd -x -D "cn=Manager,dc=summitnjhome,dc=com" -W -f /tmp/passwd.ldif
adding new entry "uid=root,ou=People,dc=summitnjhome,dc=com"
ldap_add: Invalid syntax (21)
       additional info: objectClass: value #6 invalid per syntax

Here is the first entry which presented a problem when I attempted to add it:

dn: uid=root,ou=People,dc=summitnjhome,dc=com
uid: root
cn: Enoch &
givenName: Enoch
sn: &
mail: root@xxxxxxxxxxxxxxxx
mailRoutingAddress: root@xxxxxxxxxxxxxxxxxxxxx
mailHost: mail.summitnjhome.com
objectClass: inetLocalMailRecipient
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: kerberosSecurityObject
userPassword: {crypt}*
krbName: root@xxxxxxxxxxxxxxxx
loginShell: /bin/csh
uidNumber: 0
gidNumber: 0
homeDirectory: /root
gecos: Enoch &


And here are the schemas I have included in my slapd.conf:


LDAP# cat /usr/local/etc/openldap/slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/openldap.schema
include         /usr/local/etc/openldap/schema/sudoers.schema
include         /usr/local/etc/openldap/schema/nis.schema
include         /usr/local/etc/openldap/schema/misc.schema

And these are the permissions on those schema files:

[root@LBSD2:/usr/local/etc/openldap/schema]#ls -l core.schema
cosine.schema inetorgperson.schema openldap.schema sudoers.schema
nis.schema misc.schema

-r--r--r--  1 root  wheel  20583 Oct  9 21:37 core.schema
-r--r--r--  1 root  wheel  74080 Oct  9 21:37 cosine.schema
-r--r--r--  1 root  wheel   6360 Oct  9 21:37 inetorgperson.schema
-r--r--r--  1 root  wheel   2471 Oct  9 21:37 misc.schema
-r--r--r--  1 root  wheel   7723 Oct  9 21:37 nis.schema
-r--r--r--  1 root  wheel   1602 Oct  9 21:37 openldap.schema
-r--r--r--  1 root  wheel   1655 Oct  9 02:50 sudoers.schema

And here is what is happening in the LDAP logs when I try to add the file:

Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: read activity on 11
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: select: listen=6
active_threads=0 tvp=NULL
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: select: listen=7
active_threads=0 tvp=NULL
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: activity on 1 descriptor
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: waked
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: select: listen=6
active_threads=0 tvp=NULL
Oct 28 19:39:20 LBSD2 slapd[7372]: daemon: select: listen=7
active_threads=0 tvp=NULL
Oct 28 19:39:20 LBSD2 slapd[7372]: conn=1002 op=1 ADD
dn="uid=root,ou=People,dc=summitnjhome,dc=com"
Oct 28 19:39:20 LBSD2 slapd[7372]: conn=1002 op=1 RESULT tag=105
err=21 text=objectClass: value #4 invalid per syntax



Thanks for your help!

-- 
Here's my RSA Public key:
gpg --keyserver pgp.mit.edu --recv-keys 5A4873A9

Share and enjoy!!
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux