Gentoo Archives: gentoo-user

From: Jarry <mr.jarry@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] PAM auto-adding ".db" suffix: feature or bug?
Date: Sat, 23 Aug 2014 19:23:49
Message-Id: 53F8E9A5.6000108@gmail.com
1 Hi Gentoo-users,
2
3 after playing with PAM for a few days I discovered one strange
4 thing: PAM adds ".db" suffix to database definition on its own!
5 What I mean is following:
6 _____________________
7
8 more /etc/pam.d/postfix
9 auth required pam_userdb.so db=/etc/postfix/virtual_users.db
10 account required pam_userdb.so db=/etc/postfix/virtual_users.db
11
12 ls -l /etc/postfix/virtual_users.db
13 -rw------- 1 root root 12288 Aug 20 18:45 /etc/postfix/virtual_users.db
14
15 testsaslauthd -u user1 -p password1 -s postfix
16 0: NO "authentication failed"
17
18 tail -n1 saslauth.log
19 saslauthd: pam_userdb(postfix:auth): user_lookup: could not open
20 database '/etc/postfix/virtual_users.db': no such file or directory
21 ______________________
22
23 Then I changed /etc/pam.d/postfix to:
24
25 auth required pam_userdb.so db=/etc/postfix/virtual_users
26 account required pam_userdb.so db=/etc/postfix/virtual_users
27
28 And now everything works. But there is no /etc/postfix/virtual_users
29 file, only /etc/postfix/virtual_users.db!
30
31 So it seems to me PAM adds ".db" to database-definition itself
32 and user has to define it without ".db", otherwise what PAM is
33 actually looking for is /etc/postfix/virtual_users.db.db
34
35 Is this normal? Never seen this "Windows-like" behaviour with
36 auto-adding suffix in *nix world. And I did not find anything
37 about it in PAM-documentation. It says just:
38
39 pam_userdb.so db=/path/database
40
41 Not a single word that user has to cut ".db" suffix from
42 "database" off. If all this is feature and not bug, then it
43 should definitely be mentioned somewhere...
44
45 Jarry
46 --
47 _______________________________________________________________
48 This mailbox accepts e-mails only from selected mailing-lists!
49 Everything else is considered to be spam and therefore deleted.

Replies

Subject Author
Re: [gentoo-user] PAM auto-adding ".db" suffix: feature or bug? Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] PAM auto-adding ".db" suffix: feature or bug? Nilesh Govindrajan <me@××××××××.com>