Remove multiple users

Using UCS 4.3, testing LDAP, I have created two users with attribute:

employeeType: staff

the I would like to clean up and I tried this but it fails

# udm users/user remove --filter "employeeType=staff" 
Information provided is not sufficient: more than one object

is it possible to remove multiple users at once using filter (or different method)?
Thanks
A.

I should add that I have created such users via:

udm users/user create --set lastname=One --set username=user1 --set employeeType=staff --set unixhome=/home/user1 --set password=qweasdqweasd

Hi,

udm does not allow to remove multiple users.

What you could do is to do a little bit of scripting for yourself.
Use “univention-ldapsearch” to get the dn’s for the users you want to delete.
And then “feed” udm with these dn’s.

/CV

Untested and dangerous:

udm users/user list --filter "…" | \
  grep '^DN:' | \
  sed -e 's/^DN: *//' | \
  xargs -r -d '\n' -n 1 echo udm users/user remove --dn=

Edit: I’ve changed the example to echo the removal commands first without executing them immediately. When you’re satisfied with the commands, simply remove the echo in the last line and re-run it.

ok, thanks to all for your replies.