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

Re: Newbie ldapsearch syntax question



John P. Looney writes:
 > 
 >  I still don't know how to insert the data however. I've prepended this to
 > the passwd.ldif file that migrate_passwd.pl has created:
 > 
 > ---------------------------------------------------------------
 > dn: dc=fv, dc=digiserve, dc=ie
 > o: online.ie
 > objectclass: organization
 > 
 > dn: ou=People, dc=fv, dc=digiserve, dc=ie
 > o: online.ie
 > objectclass: organization
 > ---------------------------------------------------------------
 > 
 >  And the first few lines of the passwd.ldif file contain stuff like:
 > 
 > ---------------------------------------------------------------
 > dn: uid=ftp,ou=People,dc=fv,dc=digiserv,dc=ie
 > uid: ftp
 > cn: FTP User
 > objectClass: account
 > objectClass: posixAccount
 > objectClass: top
 > objectClass: shadowAccount
 > userPassword: {crypt}*
 > shadowLastChange: 10903
 > shadowMax: 99999
 > shadowWarning: 7
 > uidNumber: 14
 > gidNumber: 50
 > homeDirectory: /home/ftp
 > gecos: FTP User
 > ---------------------------------------------------------------
 > 
 >  However, when I run:
 > 
 > # ldapadd  -w secret -D "cn=ldap, dc=fv, dc=digiserve, dc=ie" < passwd.ldif
 > adding new entry uid=ftp,ou=People,dc=fv,dc=digiserv,dc=ie
 > ldap_add: No such object
 > 
 > # ldapsearch -b "ou=people, dc=fv, dc=digiserve, dc=ie" "objectclass=*"
 > gives me:
 > ou=People, dc=fv, dc=digiserve, dc=ie
 > o=online.ie
 > objectclass=organization
 > 
 >  So I have created the "ou=people, dc=fv, dc=digiserve, dc=ie" branch. So,
 > what "object" doesn't exist in the LDAP database ?
 > 

I think this fails because your definition above for
  dn: ou=people, dc=fv, dc=digiserve, dc=ie
does not specify an ou attribute; a more correct objectclass
specification for this dn would be

  dn: ou=people, dc=fv, dc=digiserve, dc=ie
  ou: people
  objectclass: organizationalunit

if you want to use the organization objectclass then I think the dn
should be
  dn: o=People, dc=fv, dc=digiserve, dc=ie

Bill A