Hello Dominic,

Thanks for the reply.

I have enabled the debug mode and captured the logs for API call.
Please find the attached logs file with this mail.

After the API call for LDAP configuration, I tried to login to foreman with
LDAP user and I am getting below error

2017-01-24T11:09:52 [ldap] [D]   op bind (6105.6ms)  [ result=failure ]
2017-01-24T11:09:52 [ldap] [D]   valid_user? (6106.3ms)  [ user=b09871 ]
2017-01-24T11:09:52 [app] [W] Error during authentication against
'LDAP-LDAP-Server'
 | LdapFluff::Generic::UnauthenticatedException: Could not bind to
ActiveDirectory user [email protected]
 |
/usr/share/foreman/vendor/ruby/2.0.0/gems/ldap_fluff-0.4.1/lib/ldap_fluff/generic.rb:59:in
`service_bind'

Then I login to Foreman GUI and update the same account password from GUI
and it is working fine.
2017-01-24T11:14:54 [ldap] [D]   op bind (5217.0ms)  [ result=success ]
2017-01-24T11:14:54 [ldap] [D]   authenticate (15610.1ms)  [ user=b09871 ]

Please help

Best Regards,
Unnikrishnan K

On Mon, Jan 23, 2017 at 2:19 PM, Dominic Cleal <[email protected]> wrote:

> On 19/01/17 10:41, Unnikrishnan K wrote:
> >
> > Hello,
> >
> > I have configured the LDAP from Foreman GUI and LDAP authentication is
> > working fine. I tried to automate the same by using python script which
> > is calling Foreman API and LDAP configuration is added successfully by
> > the script. But LDAP authentication is not working unless I login to
> > Foreman GUI and update the LDAP account password.
> >
> >
> > I am using the same LDAP account password in the script but it is
> > working only when I am updating it from GUI (Administer -> LDAP
> > authentication)
>
> This was also filed at http://projects.theforeman.org/issues/18135, but
> without the information I requested it's difficult to say what's wrong.
> Please include the exact details and logs from your API call.
>
> --
> Dominic Cleal
> [email protected]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Foreman users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/foreman-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Attachment: production.log
Description: Binary data

Reply via email to