Hey folks
I will need to add/remove users on a regular basis. However this is a PITA on 6 isolated environments, each hooked into their own LDAP server [rhel IDM]. The current process is to import the users each time from the "Add users from LDAP/AD" button. I put in my username as the dn string for myself, my password and it pops up the ldap tree.
I thought I would try via the API, and this option doesnt work in the API calls as there is no import. Thats fair enough.
So I thought i would use the documentation and try it, however this is what I get: [The auth-id i got from the authserver XGET referenced from the docs]
curl -k -XPOST "https://X.X.X.X/nagiosxi/api/v1/system/ ... y&pretty=1" -d 'auth_type=ldap&auth_server_id=5bacb57bc9d00&&ad_username=eddy&ldap_dn="cn=users,cn=accounts,dc=ref,dc=company,dc=net"&username=eddy&name=Electric Eddy&email=ed'
{
"success": "User account eddy was added successfully!",
"user_id": null
}
API & LDAP Users
Re: API & LDAP Users
Turns out the issue was the missing @ in the email address [i didnt have to fill in name & email previously when doing it via GUI]
However cant seem to get the "User's Full DN:" in, as it appears blank every time.
However cant seem to get the "User's Full DN:" in, as it appears blank every time.
Re: API & LDAP Users
Never mind, it was the " i had in there......
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API & LDAP Users
Ok great, glad it is resolved.bomahony wrote:Never mind, it was the " i had in there......
Locking thread