blob: d9e58c969bcf6752dcb1fab9b52b259c4e2afd7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Based on [User PAM backend 0.1](https://apps.owncloud.com/content/show.php/User+PAM+backend?content=174684).
Edit `pwauth/pwauth/config.h` and set the web server's user id:
```c
#define SERVER_UIDS x
```
Compile pwauth: `cd pwauth/pwauth && make`.
Compile members: `cd members_src && make`.
Copy both binaries to some directory (e.g. `/usr/local/bin`), configure plugin's `appinfo/app.php`
Set suid-flag to allow the script to read `/etc/passwd`: `chmod u+s pwauth`
If something does not work, start debugging by adding this line in `user_pam.php`:
```diff
if (fwrite($handle, "$uid\n$password\n") === false)
return false
$result = pclose( $handle );
if (0 === $result)
return $uid;
+ error_log($result);
return false;
```
Error codes are at the bottom of pwauth's `INSTALL`.
|