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

Re: ldap question



> objectClass ( 1.3.6.1.4.1.17806.2.2.2
>         NAME 'iswAccount'
>         DESC 'Isw account info'
>         SUP 'top' STRUCTURAL
>         MUST (  userPassword $ loginShell $ uidNumber $ gidNumber $
>                 homeDirectory $givenName $creatorsName $createTimestamp $
>                 host $ postalAddress $ mail )
>         MAY ( gecos $ jpegPhoto $ telephoneNumber $
>               labeledURI $ orgIswHardQuota $ orgIswSoftQuota $ shadowMin $
> shadowMax $ shadowLastChange $
>              shadowWarning $ shadowInactive $ shadowExpire $ shadowFlag $
> hostAccess ))

This isn't the kosher way to go about it.  Descend an objectclass from 
posixAccount adding all your isw specific attributes.  Then add the AUX 
shadowAccount objectclass to the object.  Also seems like you want 
inetOrgPerson.  Many LDAP applications assume some of the "standard" schema, 
you'll be happier if you stick to the standard whenever possible.> 		
									
	    
> And i can add a user without any problem   
> dn: uid=tester,ou=People,dc=isw,dc=be
> uid: tester
> cn: tester
> objectClass: top
> objectClass: uidOrganizationalPersonNameForm
> objectClass: iswAccount
> sn: tester
> givenName: iemand
> userPassword: {crypt}$1$pylxkyq0$5LjFk6cgPoJHiPMKyOEs20
> shadowLastChange: 12066
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /bin/bash
> uidNumber: 1040
> gidNumber: 1040
> homeDirectory: /home/tester
> gecos: Tester Ldap,,,
> host: nikita
> host: madoka
> mail: tester@foo.be
> And i can search for it
> ldapsearch -x -b "ou=People,dc=isw,dc=be" "(objectClass=*)"
> # tester, People, isw, be
> dn: uid=tester,ou=People,dc=isw,dc=be
> uid: tester
> cn: tester
> objectClass: top
> objectClass: uidOrganizationalPersonNameForm
> objectClass: iswAccount
> sn: tester
> givenName: iemand
> shadowLastChange: 12066
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /bin/bash
> uidNumber: 1040
> gidNumber: 1040
> homeDirectory: /home/admin/tester
> gecos: Tester Ldap,,,
> host: nikita
> host: madoka
> mail: tester@isw.student.khleuven.be
> > But i can't perform the following search
> > ldapsearch -x -b "ou=People,dc=isw,dc=be" "(objectClass=iswAccount)"
> # numResponses: 1
> How come this doesn't work?
> Also with another filter like (&(objectClass=iswAccount)(uid=tester)) (wich
> libnss-ldap needs as a filter) this doesn't work?
> Anyone any hints on what i am doing wrong?

How did you add it? ldapadd?