Gentoo Archives: gentoo-user

From: Jarry <mr.jarry@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] PAM auto-adding ".db" suffix: feature or bug?
Date: Sun, 24 Aug 2014 15:57:24
Message-Id: 53FA0AC6.2090107@gmail.com
In Reply to: Re: [gentoo-user] PAM auto-adding ".db" suffix: feature or bug? by Alan McKinnon
1 On 24-Aug-14 17:44, Alan McKinnon wrote:
2 >>> Consult Google and find out more about postfix's postmaps with
3 >>> particular reference to how it's done if you use db files from sleepycat
4 >>
5 >> This has nothing to do with postfix, I used it just as
6 >> an example. I had the very same problem with ftp.
7 >>
8 >> My Postfix uses cyrus-sasl for smtp-authentification,
9 >> and cyrus-sasl in my example uses pam with user-db.
10 >>
11 >> Problem is PAM configuration, which must contain:
12 >> db=/etc/postfix/virtual_users (without ".db")
13 >>
14 >> But real user database is in:
15 >> /etc/postfix/virtual_users.db
16 >>
17 >> This I find very strange...
18 >
19 > It's unusual, but it's also the way it is. Why are you so concerned?
20 >
21 > You edit the file without extension and create a db file with .db
22 > extension which the software uses. Perhaps not 100% what you were
23 > expecting but if that's how the bits of software are written, what's the
24 > problem?
25
26 I see two problems:
27
28 1. pam-docs says nothing about it (or it is so deep I did not find
29 it). If the user-db file is /etc/postfix/virtual_users.db then how
30 in the hell should user know he must write:
31
32 db=/etc/postfix/virtual_users
33
34 in pam-config file and not:
35
36 db=/etc/postfix/virtual_users.db
37 ???
38
39 2. error-log is very misleading. It says
40 '/etc/postfix/virtual_users.db': no such file or directory
41 while in fact pam was looking for '/etc/postfix/virtual_users.db.db'.
42
43 Jarry
44 --
45 _______________________________________________________________
46 This mailbox accepts e-mails only from selected mailing-lists!
47 Everything else is considered to be spam and therefore deleted.