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 09-22-2017 02:50 PM
[[email protected] ~]$ curl -s -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://m1.hdp22:6080/service/xusers/secure/users/416 | python -m json.tool { "createDate": "2017-09-22T14:19:47Z", "description": "user1 desc", "firstName": "user1", "groupIdList": [ 2, 12 ], "groupNameList": [ "gg_s7_data1_home_s5", "dl-go-hadoop-users" ], "id": 416, "isVisible": 0, "lastName": "user1", "name": "user1", "owner": "admin admin", "password": "*****", "status": 1, "updateDate": "2017-09-22T14:20:13Z", "updatedBy": "admin admin", "userRoleList": [ "ROLE_USER" ], "userSource": 0 } [[email protected] ~]$ curl -u admin:admin -v -i -s -X DELETE -H "Content-Type: application/json" http://m1.hdp22:6080/service/xusers/users/416 * About to connect() to m1.hdp22 port 6080 (#0) * Trying 172.29.90.10... connected * Connected to m1.hdp22 (172.29.90.10) port 6080 (#0) * Server auth using Basic with user 'admin' > DELETE /service/xusers/users/416 HTTP/1.1 > Authorization: Basic c2F1cmt1bWE6U2VwdEAyMDE0 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: m1.hdp22:6080 > Accept: */* > Content-Type: application/json > < HTTP/1.1 204 No Content HTTP/1.1 204 No Content < Server: Apache-Coyote/1.1 Server: Apache-Coyote/1.1 < Set-Cookie: RANGERADMINSESSIONID=21FBD20B95E71693980D2118C4A65BD2; Path=/; HttpOnly Set-Cookie: RANGERADMINSESSIONID=21FBD20B95E71693980D2118C4A65BD2; Path=/; HttpOnly < X-Frame-Options: DENY X-Frame-Options: DENY < Date: Fri, 22 Sep 2017 14:44:31 GMT Date: Fri, 22 Sep 2017 14:44:31 GMT < * Connection #0 to host m1.hdp22 left intact * Closing connection #0 [[email protected] ~]$ curl -s -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://m1.hdp22:6080/service/xusers/secure/users/416 | python -m json.tool { "createDate": "2017-09-22T14:19:47Z", "description": "user1 desc", "firstName": "user1", "groupIdList": [ 2, 12 ], "groupNameList": [ "gg_s7_data1_home_s5", "dl-go-hadoop-users" ], "id": 416, "isVisible": 0, "lastName": "user1", "name": "user1", "owner": "admin admin", "password": "*****", "status": 1, "updateDate": "2017-09-22T14:20:13Z", "updatedBy": "admin admin", "userRoleList": [ "ROLE_USER" ], "userSource": 0 }
Created 09-22-2017 07:56 PM
Usually the delete calls for users do a soft delete, i.e. they change the status of the user to be not visible. Try passing forceDelete=true to the URL to achieve hard delete.
Created 09-22-2017 07:56 PM
Usually the delete calls for users do a soft delete, i.e. they change the status of the user to be not visible. Try passing forceDelete=true to the URL to achieve hard delete.
Created 09-23-2017 03:45 AM
thanks @vperiasamy. I used forceDelete=true and its deleted user from ranger.
curl -u admin:admin -v -i -s -X DELETE -H "Content-Type: application/json" http://m1.hdp22:6080/service/xusers/users/416?forceDelete=true