master user in dovecot 1.2
Michal Žila
michal.zila at somi.sk
Thu Oct 15 11:12:20 UTC 2015
Hello list,
i would like to use master user functionality in dovecot v1.2, but i just cant get it to work:
Here’s my configuration:
# dovecot -n
# 1.2.9: /etc/dovecot.conf
# OS: Linux 2.6.18-164.10.1.el5PAE i686 Red Hat Enterprise Linux Server release 5.4 (Tikanga)
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
first_valid_uid: 200
mail_privileged_group: mail
mail_location: mbox:~/mail:INBOX=/var/mail/%u
mail_executable(default): /root/dovecot-master-postlogin
mail_executable(imap): /root/dovecot-master-postlogin
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
lda:
postmaster_address: postmaster at example.com
auth default:
master_user_separator: *
debug: yes
passdb:
driver: passwd-file
args: /etc/dovecot.passwd.masterusers
pass: yes
master: yes
passdb:
driver: pam
userdb:
driver: passwd
# cat /root/dovecot-master-postlogin
#!/bin/bash
MASTER_USER=$USER
export MASTER_USER
exec /usr/libexec/dovecot/imap "$@“
# cat /etc/dovecot.passwd.masterusers
masteruser:{PLAIN}Heslo42
Trying login as normal user:
# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.
a1 login jozefkova jozefkova026
a1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH] Logged in
Trying login as master user:
# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] Dovecot ready.
a1 login jozefkova*masteruser Heslo42
a1 NO [AUTHORIZATIONFAILED] Authorization failed
log sequence of failed auth:
Oct 15 13:04:47 linux dovecot: auth(default): client in: AUTH 1 PLAIN service=imap secured lip=127.0.0.1 rip=127.0.0.1 lport=143 rport=34618 resp=<hidden>
Oct 15 13:04:47 linux dovecot: auth(default): passwd-file(masteruser,127.0.0.1,master): lookup: user=masteruser file=/etc/dovecot.passwd.masterusers
Oct 15 13:04:47 linux dovecot: auth(default): passdb(masteruser,127.0.0.1,master): Master user logging in as jozefkova
Oct 15 13:04:47 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): lookup service=dovecot
Oct 15 13:04:47 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): #1/1 style=1 msg=Password:
Oct 15 13:04:49 linux dovecot: auth-worker(default): pam(jozefkova,127.0.0.1): pam_authenticate() failed: Authentication failure (password mismatch?)
Oct 15 13:04:51 linux dovecot: auth(default): client out: FAIL 1 user=jozefkova authz
So i can see it’s trying to loggin in using pam mech. Is there something i can configure in dovecot userdb or is it something else? I use pam to authenticate my real users…
Thank you in advance…
—
Michal Zila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4021 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20151015/41afc846/attachment-0001.p7s>
More information about the dovecot
mailing list