You can delete users and groups from Ranger by using the
deleteUserGroupUtil.py script in
/opt/cloudera/parcels/CDP/lib/ranger-admin/deleteUserGroupUtil.py.Only users with the "admin" role can delete users or groups in bulk.
Get all the users through API or from database directly:
# GET http://<ip>:6080/service/xusers/users/
# GET http://<ip>:6080/service/xusers/groups/
Or
# select user_name from x_user
Save all the users you want to delete in a file, except service users (keep
only AD/LDAP users).
On the Ranger host, go to the following location:
cd /opt/cloudera/parcels/CDP-<version>/lib/ranger-admin/
Run the following Python script:
Example - # python /opt/cloudera/parcels/CDH/lib/ranger-admin/deleteUserGroupUtil.py -users <user file path>
-admin <ranger admin user> -force -url <Ranger Admin URL> -sslCertPath: <Filepath to ssl certificate to use when Ranger Admin uses HTTPS>
This site uses cookies and related technologies, as described in our privacy policy, for purposes that may include site operation, analytics, enhanced user experience, or advertising. You may choose to consent to our use of these technologies, or