[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Help: Problem to add ldif entries with ldapadd



RTFM!!!

LDIF records are separated by empty lines!!

dn: dc=Mydomain,dc=com
> objectClass: dcObject
> objectClass: organization
> o: Myorganization
> dc: Mydomain
___EMPTY LINE___
> dn: cn=Manager,dc=Mydomain,dc=com
> objectClass: organizationalRole
> objectClass: simpleSecurityObject
> cn: Manager
___EMPTY LINE___
> dn: ou=People,o=Myorganization,dc=Mydomain,dc=com
> ou: People
> objectClass: top
> objectClass: organizationalUnit


On Mon, 2005-07-18 at 11:19 +0200, zyacoubi@free.fr wrote:
> Hi,
> 
> I've successfully installed OpenLDAP (2.0.27-17), got it running, and
> had slapd start fine.
> But when I try to add the value of attribute by doing:
> 
> ldapadd -D "cn=Manager,dc=Mydomain,dc=com" -w secret -f ./users.ldif   -x
> 
> I get the following error:
> 
> adding new entry "dc=Mydomain,dc=com"
> ldap_add: Undefined attribute type
>         additional info: dn: attribute type undefined
> 
> ldif_record() = 17
> 
> The content of the users.ldif is:
> 
> 
> dn: dc=Mydomain,dc=com
> objectClass: dcObject
> objectClass: organization
> o: Myorganization
> dc: Mydomain
> dn: cn=Manager,dc=Mydomain,dc=com
> objectClass: organizationalRole
> objectClass: simpleSecurityObject
> cn: Manager
> dn: ou=People,o=Myorganization,dc=Mydomain,dc=com
> ou: People
> objectClass: top
> objectClass: organizationalUnit
> dn: uid=test,ou=People,dc=Mydomain,dc=com
> objectclass: top
> objectclass: person
> objectclass: posixAccount
> objectclass: ldapPublicKey
> description: Test Account
> userPassword: xxxfrdsyhFDSEE
> cn: test
> sn: test user
> uid: test
> uidNumber: 1034
> gidNumber: 1000
> homeDirectory: /users/test
> sshPublicKey: ssh-dssAAAAB3NzaC1kc3MAAAEBAOvL8pREUg9wSy/8+hQJ54YF3AXkB0OZrXB
> 
> 
> When I add these entries by using slapadd all is OK: i can see the content via
> slapcat. But when i try to
> do ldapsearch, i've no response (see bellow):
> 
> #ldapsearch  -b "dc=orange,dc=com" -D "cn=Manager,dc=orange,dc=com" -x -w secret
> "(objectClass=*)"
> 
> version: 2
> 
> #
> # filter: (objectClass=*)
> # requesting: ALL
> #
> 
> # search result
> search: 2
> result: 32 No such object
> 
> # numResponses: 1
> 
> 
> 
> Even though my slapd.conf file contains the following :
> 
> include         /etc/openldap/schema/core.schema
> include         /etc/openldap/schema/cosine.schema
> include         /etc/openldap/schema/inetorgperson.schema
> include         /etc/openldap/schema/nis.schema
> include         /etc/openldap/schema/redhat/autofs.schema
> include         /etc/openldap/schema/redhat/kerberosobject.schema
> # schema for ssh public key authetication
> include         /etc/openldap/schema/redhat/SshPublicKey.schema
> 
> #######################################################################
> # ldbm database definitions
> #######################################################################
> 
> database        ldbm
> suffix          "dc=Mydomain,dc=com"
> rootdn          "cn=Manager,dc=Mydomain,dc=com"
> rootpw          secret
> # Indices to maintain
> index   objectClass,uid,uidNumber,gidNumber,memberUid   eq
> index   cn,mail,surname,givenname                       eq,subinitial
> 
> 
> Thanks for your help
-- 
bestsolution.at EDV Systemhaus GmbH
http://www.bestsolution.at