1 |
On 23/08/2014 21:21, Jarry wrote: |
2 |
> Hi Gentoo-users, |
3 |
> |
4 |
> after playing with PAM for a few days I discovered one strange |
5 |
> thing: PAM adds ".db" suffix to database definition on its own! |
6 |
> What I mean is following: |
7 |
> _____________________ |
8 |
> |
9 |
> more /etc/pam.d/postfix |
10 |
> auth required pam_userdb.so db=/etc/postfix/virtual_users.db |
11 |
> account required pam_userdb.so db=/etc/postfix/virtual_users.db |
12 |
> |
13 |
> ls -l /etc/postfix/virtual_users.db |
14 |
> -rw------- 1 root root 12288 Aug 20 18:45 /etc/postfix/virtual_users.db |
15 |
> |
16 |
> testsaslauthd -u user1 -p password1 -s postfix |
17 |
> 0: NO "authentication failed" |
18 |
> |
19 |
> tail -n1 saslauth.log |
20 |
> saslauthd: pam_userdb(postfix:auth): user_lookup: could not open |
21 |
> database '/etc/postfix/virtual_users.db': no such file or directory |
22 |
> ______________________ |
23 |
> |
24 |
> Then I changed /etc/pam.d/postfix to: |
25 |
> |
26 |
> auth required pam_userdb.so db=/etc/postfix/virtual_users |
27 |
> account required pam_userdb.so db=/etc/postfix/virtual_users |
28 |
> |
29 |
> And now everything works. But there is no /etc/postfix/virtual_users |
30 |
> file, only /etc/postfix/virtual_users.db! |
31 |
> |
32 |
> So it seems to me PAM adds ".db" to database-definition itself |
33 |
> and user has to define it without ".db", otherwise what PAM is |
34 |
> actually looking for is /etc/postfix/virtual_users.db.db |
35 |
> |
36 |
> Is this normal? Never seen this "Windows-like" behaviour with |
37 |
> auto-adding suffix in *nix world. And I did not find anything |
38 |
> about it in PAM-documentation. It says just: |
39 |
> |
40 |
> pam_userdb.so db=/path/database |
41 |
> |
42 |
> Not a single word that user has to cut ".db" suffix from |
43 |
> "database" off. If all this is feature and not bug, then it |
44 |
> should definitely be mentioned somewhere... |
45 |
|
46 |
|
47 |
Consult Google and find out more about postfix's postmaps with |
48 |
particular reference to how it's done if you use db files from sleepycat |
49 |
|
50 |
|
51 |
-- |
52 |
Alan McKinnon |
53 |
alan.mckinnon@×××××.com |