lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

deleting multiple user #517

Open MeOnGitHub123 opened 5 years ago

MeOnGitHub123 commented 5 years ago

hey,

we are running a cleanup so I need to clean tons of folders from its users expect my admin account. however I strugeling to delete multiple users at once ?

i tried with wildcards but seems not to work lpass share userdel shared-Test-folder *

at very best somebody know the whole syntaxt how to remove all users expect one. my idea is otherwise remove all users and add my admin in a next step

thanks for your ideas in advane

maelvls commented 4 years ago

First, get the emails:

lpass share userls Shared-Test-folder

I then use xargs for that. -P16 for parallelizing (since each call takes ~500ms)

xargs -n1 -P16 lpass share userdel Shared-Test-folder <<EOF
user@email.com
user2@email.com
EOF