Last active
May 25, 2016 11:00
-
-
Save saliceti/38109ff695347eaec30110317b4e881a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
NAME=$1 | |
UAA_ENDPOINT=https://... | |
UAA_ADMIN_CLIENT_PASS=xxxxx | |
PASSWORD=test | |
echo "Creating user ${NAME}" | |
uaac --trace target "${UAA_ENDPOINT}" | |
uaac --trace token client get admin -s "${UAA_ADMIN_CLIENT_PASS}" | |
uaac --trace user add "${NAME}" -p "${PASSWORD}" --emails ignored | |
echo "Add permissions to user ${NAME}" | |
uaac --trace member add cloud_controller.admin "${NAME}" | |
uaac --trace member add uaa.admin "${NAME}" | |
uaac --trace member add scim.read "${NAME}" | |
uaac --trace member add scim.write "${NAME}" | |
uaac --trace member add doppler.firehose "${NAME}" | |
echo "Removing user ${NAME}" | |
uaac --trace user delete "${NAME}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment