Member since
04-03-2019
1
Post
0
Kudos Received
0
Solutions
04-03-2019
09:09 PM
Paul Coddling solution worked for me. I am using HDP 3.0.1 and was able to use this solution to remove over 800 users via the REST API. I did have 2 conditions that I had to resolve manually: 1) for users with a $ in their name I had to escape them in the delete_users.sh script. So '...users/$somenamehere' becomes '...users/\$somenamehere'. I had 95 of these so I used vi to do a search and replace like this: :%s/users\/\$/users\/\\$/g 2) This didn't work for users with a space in the name. I only had one like this so I replaced the space with a %20 and executed the curl command manually. If someone had the time they could pull the statement to recreate the users.json into the python script, loop through them all and edit the names if needed and then execute the python statement. But I got this to work pretty quickly and didn't mind making the manual changes.
... View more