# Unauthenticated bind (DN with no password) disallowed

**URL:** https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307
**Category:** Support apps
**Tags:** pixelfed, english
**Created:** [April 3, 2023, 9:54am UTC](https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307 "2023-04-03T09:54:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Deregon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@Deregon](https://forum.yunohost.org/u/Deregon)
#### Post date: [April 3, 2023, 9:54am UTC](https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307/1 "2023-04-03T09:54:07Z")

</div>

### My YunoHost server

**Hardware:** VPS bought online  
**YunoHost version:** 11.1  
**I have access to my server :** Through SSH | through the webadmin  
**Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?** : no  
**If yes, please explain:**

### Description of my issue

When attempting to enable LDAP auth for Pixelfed, I found out that no password appears to be required (see my [other post](https://forum.yunohost.org/t/how-to-obtain-the-ldap-password/24077/2)). However, using the same parameters, I get the following error message when running `php artisan ldap:test`:

```auto
ldap_bind(): Unable to bind to server: Server is unwilling to perform. Error Code: [53] Diagnostic Message: unauthenticated bind (DN with no password) disallowed

```

It seems that a password is, in fact, required, I just don’t know which one or how to access it.

---

<div class="post-metadata">

### Author: ![Deregon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/d/838e76/32.png) [@Deregon](https://forum.yunohost.org/u/Deregon)
#### Post date: [April 13, 2023, 8:08am UTC](https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307/2 "2023-04-13T08:08:29Z")

</div>

This is now fixed ! Here is what I did:  
I modified the config like this:

```auto
LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_CONNECTIONS=default
LDAP_DEFAULT_HOSTS=127.0.0.1
LDAP_DEFAULT_USERNAME="" 
LDAP_DEFAULT_PASSWORD=""
LDAP_DEFAULT_PORT=389
LDAP_DEFAULT_BASE_DN="dc=yunohost,dc=org"
LDAP_DEFAULT_TIMEOUT=5
LDAP_DEFAULT_SSL=false
LDAP_DEFAULT_TLS=false

```

The connection works when you put no username _and_ no password, so indeed no password was required. Then, I continued to follow the [guide](https://docs.pixelfed.org/running-pixelfed/optional-features/ldap-authentication/), but I had to replace:

```php
'model' => LdapRecord\Models\ActiveDirectory\User::class,

```

with

```php
'model' => LdapRecord\Models\OpenLDAP\User::class,

```

I don’t understand why this isn’t mentioned in their guide, but after this I can run `php artisan ldap:import users` and it will see and be able to synchronize them.

The issues I’m facing now are:

- the auth system does not work, as in, imported users cannot sign in, apparently because the passwords can’t be matched with the database
- the imported users don’t have a username when running `php artisan user:table`, the `uid` property is not synchronized

---

<div class="post-metadata">

### Author: ![sadmin](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@sadmin](https://forum.yunohost.org/u/sadmin)
#### Post date: [April 14, 2023, 11:57pm UTC](https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307/3 "2023-04-14T23:57:47Z")

</div>

what was the config file /location you changed? this looks to be very similar to the problem I’m having: [Adding catchall problem - #3 by sadmin](https://forum.yunohost.org/t/adding-catchall-problem/24424/3)

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [April 29, 2023, 11:57pm UTC](https://forum.yunohost.org/t/unauthenticated-bind-dn-with-no-password-disallowed/24307/4 "2023-04-29T23:57:51Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
