Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-05-2015 06:06 PM
I loaded LDAP accounts into Ambari and now need to remove them and re-sync. How do I remove the accounts?
Created 11-05-2015 06:42 PM
Scott, you can use the API to remove them:
curl --insecure -u admin:$PASSWORD -H 'X-Requested-By: ambari' -X DELETE http://$AMBARI_HOST:8080/api/v1/users/paul
Created 11-05-2015 06:21 PM
I believe you need to clean it up from ambari database.
for example:
[root@nsfed01 ~]# psql dbname username
Password for user ambari:
psql (8.4.20)
Type "help" for help.
ambari2112=> \dt
ambari2112=> select * from users where ldap_user=1;
user_id | principal_id | ldap_user | user_name | create_time | user_password | active | active_widget_layouts
---------+--------------+-----------+-----------+-------------+---------------+--------+-----------------------
(0 rows)
delete from users where ldap_user=1;
I aambari2112=> select * from users;
Created 11-25-2015 02:37 AM
@Paul Codding Is it ok to follow this approach?
Created 11-05-2015 06:42 PM
Scott, you can use the API to remove them:
curl --insecure -u admin:$PASSWORD -H 'X-Requested-By: ambari' -X DELETE http://$AMBARI_HOST:8080/api/v1/users/paul
Created 11-05-2015 06:43 PM
@Paul Codding This is helpful. Thanks! I believe , delete statement is not good idea to run..Comments?
Created 11-05-2015 06:50 PM
We went down the path of deleting directly from Oracle but ran into a bunch of relational constraints.
Created 11-05-2015 06:53 PM
Could you share delete statements for oracle?
Created 11-05-2015 08:13 PM
We ended up going with Paul's solution and didn't try to delete from Oracle. Thanks for all your input and help!
Created 11-05-2015 09:53 PM
I've created an internal JIRA to support bulk deletion from the CLI
Created 11-25-2015 02:37 AM
@Paul Codding Do you have jira number? Is it internal?