"PAM: Authentication failure" while installing dovecot-core, what should I do about it?

January 24, 2015 787 views

I was trying to install mail server following this guide
Webmail on your Debian server: exim4 + dovecot + roundcube

but while I was installing with

sudo apt-get install dovecot-core dovecot-imapd dovecot-mysql

this error showed up halfway.

Setting up dovecot-core (1:2.2.9-1ubuntu5) ...
chfn: PAM: Authentication failure
adduser: `/usr/bin/chfn -f Dovecot mail server dovecot' returned error code 1. Exiting.
chfn: PAM: Authentication failure
adduser: `/usr/bin/chfn -f Dovecot login user dovenull' returned error code 1. Exiting.

I tried to install with sudo apt-get install --reinstall dovecot-core , but the error didn't show up anymore.

should I do anything to fix it ?

I'm using Ubuntu 14.10 btw .

  • Hi! Was this on a fresh droplet?

    If it installed cleanly when you ran sudo apt-get install --reinstall dovecot-core You should be OK. The chfn command is used to associate information to a user account. When dovecot is installed, it creates a dovecot user. The command /usr/bin/chfn -f Dovecot mail server is simply setting the "Full name" of the user to "Dovecot mail server"

  • Well, it's not 'fresh', but it's a recent droplet with some other suff installed( like redmine, LAMP stack, mumble, tinc etc.) plus lots of manual settings all over the place.

    I think I fixed it a day after that, it might be my sshd "UsePAM Yes" setting that caused the failure.

    At the time the only place I see the word PAM is in that file, and after relooking into the guide I followed SSH Server: A more secure configuration. And found out it has the setting "UsePAM no", after correcting that, I don't see that error anymore.

    Anyway, thanks for the reply and telling me what did the chfn do. Now I can stop worrying if it would break suddenly. :)

Be the first one to answer this question.