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

Re: ldapmodify on multiple dn's



Jason Joines wrote:

I need to delete a user from a large number of groups. Is there anyway to use ldapmodify to remove the user from all the groups at once? I tried using an LDIF like the following but as soon as ldapmodify gets to the next dn, it throws an error about unknown attribute type. I also tried with just a blank line instead of a dash and with no separator.

dn: cn=web,dc=my,dc=domain,dc=org
changetype: modify
delete: memberuid
memberuid: jadoe
-
dn: cn=finweb,ou=fin,dc=my,dc=domain,dc=org
changetype: modify
delete: memberuid
memberuid: jadoe
-
dn: cn=econweb,ou=econ,dc=my,dc=domain,dc=org
changetype: modify
delete: memberuid
memberuid: jadoe
-
dn: cn=intweb,ou=int,dc=my,dc=domain,dc=org
changetype: modify
delete: memberuid
memberuid: jadoe

Just leave a blank line right after each (in this case unnecessary) dash (-). See ldif(5) and slapd.replog(5) for details.


p.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497