Member since
10-22-2017
17
Posts
0
Kudos Received
0
Solutions
07-17-2018
06:29 PM
Hi Sagar, Thank you for providing details on automating the ldap-sys. It worked wonderfully. Thanks, Abhishek
... View more
07-17-2018
05:48 PM
Hi Sridhar Reddy, How are you doing ? Thank you for your detailed explanation on automating the Ambari LDAP sync process. I tried to use the curl command you provided above by tweaking little bit and tested. I am running into issues and the logs doesn't have enough info. Below is the command I am using curl -v -k -u userid -H 'X-Requested-By: ambari' -X POST -d '[{"Event": {"specs": [{"principal_type":"groups","sync_type":"specific",
"names": "i listed the AD groups we have"}]}}]' http://ambarihostname:8080/api/v1/ldap_sync_events I get a result like this Enter host password for user 'userid':
* About to connect() to ambarihost port 8080 (#0)
* Trying IP address...
* Connected to ambarihost (IP address) port 8080 (#0)
* Server auth using Basic with user 'userid'
> POST /api/v1/ldap_sync_events HTTP/1.1
> Authorization: Basic YWJoaXNoZWsuY2hhbWFrdXJhOkBCc2IwMzIwMThxMg==
> User-Agent: curl/7.29.0
> Host: ambarihost:8080
> Accept: */*
> X-Requested-By: ambari
> Content-Length: 133
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 133 out of 133 bytes
< HTTP/1.1 201 Created
< X-Frame-Options: DENY
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Cache-Control: no-store
< Pragma: no-cache
< Set-Cookie: AMBARISESSIONID=13ps7b9q98ekhwweh8qlct0ir;Path=/;HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< User: userid
< Content-Type: text/plain
< Vary: Accept-Encoding, User-Agent
< Content-Length: 166
<
{
"resources" : [
{
"href" : "http://ambarihost:8080/api/v1/ldap_sync_events/15",
"Event" : {
"id" : 15
}
}
]
* Connection #0 to host ambarihost left intact
} Any help is much appreciated. Thanks, Abhishek
... View more