# solved - Dovecot PAM authentication issue

## durty_nacho

Thanks to the person who suggested Dovecot, soon as I get authentication working my mail system will be working.

I am running mail internally only, for one host (only one host in my network) so security for mail is not an issue. I am attempting to use PAM with plain authentication. It is failing with a PAM authentication failure. These are the pertinent settings I have set:

```

disable_plaintext_auth = no

ssl_disable = yes

login_dir = /var/run/dovecot/login

login_chroot = yes

login_user = dovecot

first_valid_uid = (UID of 'postfix' user --  should this be the UID of my user who will actually be checking/sending mail?)

protocol imap {

# Login executable location.

login_executable = /usr/libexec/dovecot/imap-login

mail_executable = /usr/libexec/dovecot/imap

## Authentication processes

# Executable location

auth_executable = /usr/libexec/dovecot/dovecot-auth

auth_verbose = yes

auth_debug = yes

auth_debug_passwords = yes -- With these set, the only error I get is "PAM authentication failed" with the user who tried to login.

auth default {

  mechanisms = plain login

  passdb pam {

# If service name is "*", it means the authenticating service name is used, eg. pop3 or imap (/etc/pam.d/pop3, /etc/pam.d/imap)

  args = "*"

  }

userdb passwd {

  args = /etc/passwd

  } 
```

This is my /etc/pam.d/imap file:

```

auth       required     pam_shells.so

auth       include      system-auth

account    include      system-auth

session    include      system-auth

```

Do you guy see anything missing or set wrong?Last edited by durty_nacho on Tue Dec 04, 2007 7:34 pm; edited 1 time in total

----------

## durty_nacho

Adding:  

auth    required        pam_unix.so nullok  

account required        pam_unix.so 

.. to my /etc/pam.d/imap file worked!

----------

