> On 19 Nov 2014, at 12:50, Jan Kraljič <[email protected]> wrote:
> 
> Hi all, 
> 
> I am trying to play with Dovecot to connect to Samba 4 LDAP so I would later 
> use SOGo over that but seem that I have some issue woth config. 
> 
> I am playing with different configs, this is the last one:
> 
> user_filter = (mail=%u)
> pass_attrs = uid=user,userPassword=password
> pass_filter = (mail=%u)
> 
> 
> Error: result:  uid missing; userPassword missing
> 
> Looks like Samba 4 does not have "uid"?
> 
> Any "good" configuration for Dovecot?
> 

Samba4 is a LDAP server so you can have any attributes that schema supports. 
“uid” is not populated by default, what you are probably after is 
“samaccountname”

Now, with dovecot you can do LDAP authentication two ways:

- password lookups http://wiki2.dovecot.org/AuthDatabase/LDAP/PasswordLookups
- authentication binds http://wiki2.dovecot.org/AuthDatabase/LDAP/AuthBinds

Myself I prefer auth binds - dovecot tries to bind to ldap server (samba4) with 
provided username and password and if succeeds considers a user authenticated

My config is as simple as:

(/etc/dovecot/dovecot-ldap.conf.ext)

hosts = localhost
auth_bind = yes
auth_bind_userdn = cn=%u,cn=Users,dc=mydomain,dc=local
ldap_version = 3
base = cn=Users,dc=mydomain,dc=local

Adjust domain components to your needs.

Hope this helps,

Regards
Martin.

-- 
[email protected]
https://inverse.ca/sogo/lists

Reply via email to