Skip to content

Instantly share code, notes, and snippets.

@pkazi
Created October 22, 2018 09:10
Show Gist options
  • Save pkazi/a022c522565c2ea548db1c0ea044678b to your computer and use it in GitHub Desktop.
Save pkazi/a022c522565c2ea548db1c0ea044678b to your computer and use it in GitHub Desktop.
DCOS delete users from organization using CLI (Open Source DCOS)
#!/bin/bash
# Usage dcosDeleteUsers.sh <Users to delete are given in list.txt, each user on new line>
for i in `cat users.list`;
do
echo $i
curl -X DELETE -H "Authorization: Bearer $(dcos config show core.dcos_acs_token)" "$(dcos config show core.dcos_url)/acs/api/v1/users/$i" -d "{}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment