Dovecot can't read other userdb than /etc/passwd
I had the last day alot of trouble with the dovecot userdb.
The problem was that dovecot only read the /etc/passwd and not my custom /etc/dovecot/users file.
I changed the /etc/dovecot/auth-passwdfile.conf.ext so that it looked like this (vmail is a user i created on my debian machine):
# Authentication for passwd-file users. Included from 10-auth.conf.
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>
passdb {
driver = passwd-file
args = /etc/dovecot/users
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/home/vmail/%u
}
My users file looked like this (sysntax of the /etc/passwd file):
test:{PLAIN}pass::::::
bill:{PLAIN}secret::::::
But when I checked if dovecot could read my users file (comand: doveadm user USERNAME) it failed reading the users file.
After I checked if everything was spelled correctly I started searching for the error.
And I found it :)
Since the dovecot.conf is just a file including other config files is started to search in those for the error. Somehow dovecot was still searching in /etc/passwd for the users and not in my /etc/dovecot/users file, eventhough I changed the auth-passwdfile.conf.ext.
The was in the 10-auth.conf file. This file has several options to include conf files. As default it includes the auth-system.conf.ext file.
But this file defines still that /etc/passwd is used as our userdb.
So I commented this line and decommented the line including our auth-passwd.conf.ext file.
And just to be save I also changed the path in the auth-system.conf.ext file to our /etc/dovecot/users userdb file.
And that's It.
Afters this it worked. The doveadm user test comand is working.
As I am relativly new to this kind of stuff I would be interested in feedback for this solution. And please excuse my bad English.
debian authentication postfix dovecot mail-server
add a comment |
I had the last day alot of trouble with the dovecot userdb.
The problem was that dovecot only read the /etc/passwd and not my custom /etc/dovecot/users file.
I changed the /etc/dovecot/auth-passwdfile.conf.ext so that it looked like this (vmail is a user i created on my debian machine):
# Authentication for passwd-file users. Included from 10-auth.conf.
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>
passdb {
driver = passwd-file
args = /etc/dovecot/users
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/home/vmail/%u
}
My users file looked like this (sysntax of the /etc/passwd file):
test:{PLAIN}pass::::::
bill:{PLAIN}secret::::::
But when I checked if dovecot could read my users file (comand: doveadm user USERNAME) it failed reading the users file.
After I checked if everything was spelled correctly I started searching for the error.
And I found it :)
Since the dovecot.conf is just a file including other config files is started to search in those for the error. Somehow dovecot was still searching in /etc/passwd for the users and not in my /etc/dovecot/users file, eventhough I changed the auth-passwdfile.conf.ext.
The was in the 10-auth.conf file. This file has several options to include conf files. As default it includes the auth-system.conf.ext file.
But this file defines still that /etc/passwd is used as our userdb.
So I commented this line and decommented the line including our auth-passwd.conf.ext file.
And just to be save I also changed the path in the auth-system.conf.ext file to our /etc/dovecot/users userdb file.
And that's It.
Afters this it worked. The doveadm user test comand is working.
As I am relativly new to this kind of stuff I would be interested in feedback for this solution. And please excuse my bad English.
debian authentication postfix dovecot mail-server
add a comment |
I had the last day alot of trouble with the dovecot userdb.
The problem was that dovecot only read the /etc/passwd and not my custom /etc/dovecot/users file.
I changed the /etc/dovecot/auth-passwdfile.conf.ext so that it looked like this (vmail is a user i created on my debian machine):
# Authentication for passwd-file users. Included from 10-auth.conf.
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>
passdb {
driver = passwd-file
args = /etc/dovecot/users
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/home/vmail/%u
}
My users file looked like this (sysntax of the /etc/passwd file):
test:{PLAIN}pass::::::
bill:{PLAIN}secret::::::
But when I checked if dovecot could read my users file (comand: doveadm user USERNAME) it failed reading the users file.
After I checked if everything was spelled correctly I started searching for the error.
And I found it :)
Since the dovecot.conf is just a file including other config files is started to search in those for the error. Somehow dovecot was still searching in /etc/passwd for the users and not in my /etc/dovecot/users file, eventhough I changed the auth-passwdfile.conf.ext.
The was in the 10-auth.conf file. This file has several options to include conf files. As default it includes the auth-system.conf.ext file.
But this file defines still that /etc/passwd is used as our userdb.
So I commented this line and decommented the line including our auth-passwd.conf.ext file.
And just to be save I also changed the path in the auth-system.conf.ext file to our /etc/dovecot/users userdb file.
And that's It.
Afters this it worked. The doveadm user test comand is working.
As I am relativly new to this kind of stuff I would be interested in feedback for this solution. And please excuse my bad English.
debian authentication postfix dovecot mail-server
I had the last day alot of trouble with the dovecot userdb.
The problem was that dovecot only read the /etc/passwd and not my custom /etc/dovecot/users file.
I changed the /etc/dovecot/auth-passwdfile.conf.ext so that it looked like this (vmail is a user i created on my debian machine):
# Authentication for passwd-file users. Included from 10-auth.conf.
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>
passdb {
driver = passwd-file
args = /etc/dovecot/users
}
userdb {
driver = static
args = uid=vmail gid=vmail home=/home/vmail/%u
}
My users file looked like this (sysntax of the /etc/passwd file):
test:{PLAIN}pass::::::
bill:{PLAIN}secret::::::
But when I checked if dovecot could read my users file (comand: doveadm user USERNAME) it failed reading the users file.
After I checked if everything was spelled correctly I started searching for the error.
And I found it :)
Since the dovecot.conf is just a file including other config files is started to search in those for the error. Somehow dovecot was still searching in /etc/passwd for the users and not in my /etc/dovecot/users file, eventhough I changed the auth-passwdfile.conf.ext.
The was in the 10-auth.conf file. This file has several options to include conf files. As default it includes the auth-system.conf.ext file.
But this file defines still that /etc/passwd is used as our userdb.
So I commented this line and decommented the line including our auth-passwd.conf.ext file.
And just to be save I also changed the path in the auth-system.conf.ext file to our /etc/dovecot/users userdb file.
And that's It.
Afters this it worked. The doveadm user test comand is working.
As I am relativly new to this kind of stuff I would be interested in feedback for this solution. And please excuse my bad English.
debian authentication postfix dovecot mail-server
debian authentication postfix dovecot mail-server
asked Dec 20 '18 at 11:33
SlartiDevSlartiDev
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386244%2fdovecot-cant-read-other-userdb-than-etc-passwd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386244%2fdovecot-cant-read-other-userdb-than-etc-passwd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown