Chef-server LDAP integration issues


I’m trying to setup LDAP integration for chef-server-core 12.17.33-1, following the instructions from the official documentation.

All is good up to the point where I have to login with my LDAP account: I’m getting a 409 “conflict” error when I try to “Link account”;

However if I do “chef-server-ctl user-list” there is no already existing user.

What could cause this error?

Here are some logs:

==> crash.log <==
2018-06-18 17:12:35 =ERROR REPORT====
{<<"method=GET; path=/users/qsjs6747; status=404; ">>,"Not Found"}

==> erchef.log <==
2018-06-18 17:12:35.217 [error] {<<"method=GET; path=/users/qsjs6747; status=404; ">>,"Not Found"}

==> current <==
2018-06-18_15:12:35.22976 [error] {<<"method=GET; path=/users/qsjs6747; status=404; ">>,"Not Found"}

==> erchef.log <==
2018-06-18 17:12:37.433 [error] {<<"method=POST; path=/users; status=409; ">>,"Conflict"}

==> crash.log <==
2018-06-18 17:12:37 =ERROR REPORT====
{<<"method=POST; path=/users; status=409; ">>,"Conflict"}

==> current <==
2018-06-18_15:12:37.44319 [error] {<<"method=POST; path=/users; status=409; ">>,"Conflict"}



The issue was because of the LDAP server which was missing some user records like “mail” and “name”;

When you manually create a user in Chef, “mail” and “full name” are mandatory fields which need to be filled.

Probably when Chef tried to create users based on LDAP information it failed miserably due to this.