@@ -5,11 +5,10 @@ A PAM module scriptable using Lua.
5
5
## Dependencies
6
6
- Sane OS/Distro
7
7
- GNU/Linux works.
8
- - FreeBSD should work too, but...
9
- - There are minor differences, but should be OK as long as you don't dive too deep.
10
- - Less tested.
8
+ - FreeBSD works too, but...
9
+ - There are minor differences, but should be OK as long as you don't dive too deep..
11
10
- C99 compatible compiler
12
- - PAM
11
+ - Open PAM or Linux PAM. Might work with other PAM variants, dunno.
13
12
- Lua libraries (5.1 and luajit tested)
14
13
- Anything above 5.1 should work, hopefully.
15
14
@@ -21,7 +20,8 @@ Set `5.1` to whatever Lua version you want to use, according to pkg-config, `5.1
21
20
22
21
## Using
23
22
24
- - Copy ` pam_lua.so ` to ` /lib/security ` or alternative for your distribution.
23
+ - Copy ` pam_lua.so ` to ` /lib/security ` or alternative for wherever your distribution wants PAM modules to reside in.
24
+ - On FreeBSD, copy it to ` /usr/lib ` .
25
25
- Make a Lua script, similar to this (untested) script:
26
26
``` lua
27
27
if pam .handler == " authenticate" then
38
38
- Edit a PAM config file and add a line using ` pam_lua.so ` , say ` auth sufficient pam_lua.so script=/path/to/script.lua `
39
39
- Note: If the script is incorrect, you might not be able to log in. If it contains backdoors, someone else might get in...
40
40
41
+ ## Examples
42
+
43
+ A dynamic MOTD generator I made is here: [ motd.lua] ( https://gist.github.com/vifino/b95713dcdf174ba96aa743264b107ff2 ) .
44
+ It ain't the prettiest code-wise, but it does the job. Ships with Clippy!
45
+
41
46
## API
42
47
- ` pam.type `
43
48
- The invoked module call type, one of the following:
0 commit comments