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

RE: Using ldapdelete to delete a user from a group



The man page doesn't have an example of modifying a particular entry based
upon a match (ie, just one member of the group based on their memberUid).
How do you do that?

My best, wild guess looks like this:

----
dn: cn=sales,ou=Group,dc=unfiw,dc=com
changetype: modify
replace: memberUID: johnd
memberUid:
----

But that doesn't work when I pass it to ldapmodify with the "-f" argument.

Thanks for your help.

--Karl


> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Luca Scamoni
> Sent: Tuesday, April 08, 2003 11:45 PM
> To: Karl Kopper
> Cc: openldap-software@OpenLDAP.org
> Subject: Re: Using ldapdelete to delete a user from a group
>
>
> ldapdelete removes entries from LDAP. You are trying to modify an entry
> (namely cn=sales,ou=Group,dc=unfiw,dc=com). Use ldapmodify (man
> ldapmodify for the syntax you should use)
> Karl Kopper wrote:
>
> >Thanks for your reply.
> >
> >It doesn't look like there are any bogus characters. Here's vi with "se
> >list" on the slapcat output:
> >
> >$
> >dn: cn=sales,ou=Group,dc=unfiw,dc=com$
> >creatorsName: cn=manager,dc=unfiw,dc=com$
> >createTimestamp: 20020605230613Z$
> >objectClass: posixGroup$
> >objectClass: top$
> >cn: sales$
> >gidNumber: 110$
> >memberUid: johnd$
> >memberUid: joe$
> >memberUid: rick$
> >memberUid: sam$
> >memberUid: tinah$
> >modifiersName: cn=manager,dc=unfiw,dc=com$
> >modifyTimestamp: 20030204223352Z$
> >$
> >
> >Guess I can load the whole thing into a file and modify it. That is sure
> >cumbersome.
> >
> >--Karl
> >
> >
> >
> >>-----Original Message-----
> >>From: owner-openldap-software@OpenLDAP.org
> >>[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Tony Earnshaw
> >>Sent: Tuesday, April 08, 2003 1:51 PM
> >>To: Karl Kopper
> >>Cc: openldap-software@OpenLDAP.org
> >>Subject: Re: Using ldapdelete to delete a user from a group
> >>
> >>
> >>tir, 08.04.2003 kl. 20.37 skrev Karl Kopper:
> >>
> >>
> >>
> >>>#ldapdelete -D  "cn=manager,dc=unfiw,dc=com" -v -w secret -x -c
> >>>"memberUid=johnd,cn=sales,ou=Group,dc=unfiw,dc=com"
> >>>
> >>>
> >>>And "sales" looks like this:
> >>>
> >>>dn: cn=sales,ou=Group,dc=unfiw,dc=com
> >>>objectClass: posixGroup
> >>>objectClass: top
> >>>cn: sales
> >>>gidNumber: 110
> >>>memberUid: johnd
> >>>memberUid: joe
> >>>memberUid: rick
> >>>memberUid: sam
> >>>memberUid: tinah
> >>>
> >>>
> >>Looks good enough to me. Just a shot in the dark: make sure that /none/
> >>of the RDNs in the respective entries have spaces at the end, when you
> >>do a 'slapcat -l' on the database and vi '/ $' or sed it.
> >>
> >>Best,
> >>
> >>Tony
> >>
> >>--
> >>
> >>Tony Earnshaw
> >>
> >>e-post:		tonni@billy.demon.nl
> >>www:		http://www.billy.demon.nl
> >>
> >>
> >
> >
> >
>
>