LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-30-2011, 03:15 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
dovecot authentication issue


Hi,

I have been trying to get the Dovecot authentication via LDAP to work on my Ubuntu Server 10.04 but with no luck. I have postfix, dovecot, squirrelmail and openLDAP running at the moment on the same server.

My goal is rather than creating new accounts on the server for each of the users (time consuming), I decided to allow a list of users from LDAP to be able to login to the mail server.

The problem I have been having is when a user login to squirrelmail, there are error messages in the mail.log file as follows

Aug 30 17:39:37 server1 dovecot: auth(default): passwd(mike_lee,127.0.0.1): unknown user
Aug 30 17:39:37 server1 dovecot: auth(default): ldap(mike_lee,127.0.0.1): invalid credentials
Aug 30 17:39:44 server1 dovecot: imap-login: Aborted login (auth failed, 1 attempts): user=<mike_lee>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

I do not know why it says unknown user and invalid credentials there. I wonder if anyone might be able to point out where it went wrong.

Here is the details of dovecot-ldap.conf

hosts = localhost
dn = cn=admin,dc=widgetexample,dc=com,dc=au
dnpass = secrets

auth_bind = yes
auth_bind_userdn = cn=%u,ou=accounts,dc=widgetexample,dc=com,dc=au

ldap_version = 3

base = ou=accounts,dc=widgetexample,dc=com,dc=au

deref = never
scope = subtree

user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid

user_filter = (&(objectClass=posixAccount)(uid=%u))

pass_attrs = uid=user,userPassword=password

homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid

pass_filter = (&(objectClass=posixAccount)(uid=%u))

default_pass_scheme = CRYPT

=========================================================
Here is the details of dovecot.conf

base_dir = /var/run/dovecot

protocols = imap

protocol imap {
listen = *:143
}

disable_plaintext_auth = no

log_timestamp = "%Y-%m-%d %H:%M:%S "

ssl = no

login_dir = /var/run/dovecot/login

login_chroot = yes

login_user = dovecot

mail_location = maildir:/home/%u/Maildir

#mail_uid =
#mail_gid =

mail_privileged_group = mail

verbose_proctitle = yes

#first_valid_uid = 500
#last_valid_uid = 0

#first_valid_gid = 1
#last_valid_gid = 0

mail_save_crlf = no

maildir_copy_with_hardlinks = yes

protocol imap {
imap_client_workarounds = outlook-idle delay-newmail netscape-eoh tb-extra-mailbox-sep
}

protocol pop3 {
pop3_uidl_format = %08Xu%08Xv
}

protocol managesieve {
}

auth_verbose = yes

auth default {
mechanisms = plain

passdb pam {
}

passdb passwd {
}

passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}

userdb passwd {
}

userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}

user = root
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
!include_try /etc/dovecot/auth.d/*.auth
}

dict {
}

plugin {
}

!include_try /etc/dovecot/conf.d/*.conf

=============================================================
Here is the details of main.cf

biff = no
append_dot_mydomain = no
readme_directory = no

myhostname = server1
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1, server1.widgetexample.com.au, localhost.localdomain, localhost, widgetexample.com.au
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
home_mailbox = Maildir/
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
broken_sasl_auth_clients = yes

I hope the information above would help you to help me out.

Any help is much appreciated.

Thank you
 
Old 09-24-2011, 09:41 AM   #2
ccolumbu
Member
 
Registered: Oct 2009
Posts: 37

Rep: Reputation: 4
Have you tested this with a mail client like t-bird directly against dovecot (to eliminate 1 layer of complexity in this case squirrel mail)? I am not sure, but this could also be related to pam.d/dovecot. Did you configure it to use the ldap auth?

I have never used ldap with dovecot before, so I am not sure I am much help here.
 
Old 09-24-2011, 01:15 PM   #3
ShanxT
Member
 
Registered: Apr 2007
Location: India
Distribution: Ubuntu 10.04, RHEL/Centos 5.x, Knoppix
Posts: 41

Rep: Reputation: 3
What's your dovecot version? Could you also check the dovecot config with this command:
Code:
dovecot -n
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A question about dovecot authentication... trist007 Slackware 2 03-16-2011 08:48 AM
Dovecot authentication switches a and i and p and l catlow Linux - Software 0 09-19-2009 08:46 AM
Dovecot Authentication Problem berzerk Linux - Server 0 08-17-2009 10:55 AM
dovecot with sql authentication!! hshzh359 Linux - Server 1 04-20-2009 06:51 AM
dovecot authentication error snurckle Linux - Newbie 4 08-13-2004 05:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration