Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP Database: Can not connect #16

Closed
Bixilon opened this issue Aug 24, 2020 · 5 comments
Closed

LDAP Database: Can not connect #16

Bixilon opened this issue Aug 24, 2020 · 5 comments

Comments

@Bixilon
Copy link

Bixilon commented Aug 24, 2020

In setup step 7 I only get a "Bad".

I can successfully connect to my ldap server with:
ldapsearch -H ldap://192.168.200.6:389 -D "cn=wpkg,CN=Users,dc=domain,dc=de" -W -b "dc=domain,dc=de"

What do I need to change in my Config file?

public $ldap = [
                'datasource' => 'CakeLdap.LdapExtSource',
                'persistent' => false,
                'host' => '192.168.200.6',
                'port' => 389,
                'login' => 'wpkg',
                'password' => '******',
                'database' => '',
                'basedn' => 'cn=wpkg,cn=Users,dc=domain,dc=de',
                'type' => 'ActiveDirectory',
                'tls' => false,
                'version' => 3,
        ];

I am using a samba4x server. Maybe you should give instructions in the Installation guide how to use the samba as ldap server...

Thanks

@anklimsk
Copy link
Owner

Hi! Try changing the 'type' => 'ActiveDirectory' parameter to 'Netscape' or 'OpenLDAP'.
I only tested on 'ActiveDirectory'.
Try turning on debugging mode and check the errors on the page and the file "app/tmp/logs/error.log".

@Bixilon
Copy link
Author

Bixilon commented Aug 24, 2020

Hey, thanks for the reply. Changed to Netscape, ... no success.

I can't even access the page, I need to configure the database first. If I want to omit ldap and configure no, the website tells me I must configure ldap.

I had debugging already enabled, no log messages. Only:
2020-08-24 19:58:36 Ldap.error: Auth failed for 'wpkg'!

@anklimsk
Copy link
Owner

anklimsk commented Aug 24, 2020

Hi! Remove the "@" character in the file app/Plugin/Datasources/Model/Datasource/LdapSource.php:261
It looks like a bug in the connection configuration. Change your config to:
'login' => 'cn=wpkg,cn=Users,dc=domain,dc=de',
'basedn' => 'cn=Users,dc=domain,dc=de',

@Bixilon
Copy link
Author

Bixilon commented Aug 24, 2020

Yah, that did it. Thanks for the support

(now I am having many 404 errors for css and js files, like '/cake_theme/cache_css/css/CakeTheme.main.css'), but thats an other issue/misconfiguration.

I think I'll make an PR to improve the Installation Instructions. But before that, I will need it working :)

@anklimsk
Copy link
Owner

Good day. Fixed in a new release: v1.0.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants