maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# PAM
 2
 3auth.pam module implements authentication using libpam. Alternatively it can be configured to
 4use helper binary like auth.external module does.
 5
 6maddy should be built with libpam build tag to use this module without
 7'use_helper' directive.
 8
 9```
10go get -tags 'libpam' ...
11```
12
13```
14auth.pam {
15    debug no
16    use_helper no
17}
18```
19
20## Configuration directives
21
22### debug _boolean_ 
23Default: `no`
24
25Enable verbose logging for all modules. You don't need that unless you are
26reporting a bug.
27
28---
29
30### use_helper _boolean_
31Default: `no`
32
33Use `LibexecDirectory/maddy-pam-helper` instead of directly calling libpam.
34You need to use that if:
35
361. maddy is not compiled with libpam, but `maddy-pam-helper` is built separately.
372. maddy is running as an unprivileged user and used PAM configuration requires additional privileges (e.g. when using system accounts).
38
39For 2, you need to make `maddy-pam-helper` binary setuid, see
40README.md in source tree for details.
41
42TL;DR (assuming you have the maddy group):
43
44```
45chown root:maddy /usr/lib/maddy/maddy-pam-helper
46chmod u+xs,g+x,o-x /usr/lib/maddy/maddy-pam-helper
47```
48