Skip to content

Commit 7c32bd1

Browse files
committed
Update the README.
1 parent 30e5d39 commit 7c32bd1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ A PAM module scriptable using Lua.
55
## Dependencies
66
- Sane OS/Distro
77
- 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..
1110
- C99 compatible compiler
12-
- PAM
11+
- Open PAM or Linux PAM. Might work with other PAM variants, dunno.
1312
- Lua libraries (5.1 and luajit tested)
1413
- Anything above 5.1 should work, hopefully.
1514

@@ -21,7 +20,8 @@ Set `5.1` to whatever Lua version you want to use, according to pkg-config, `5.1
2120

2221
## Using
2322

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`.
2525
- Make a Lua script, similar to this (untested) script:
2626
```lua
2727
if pam.handler == "authenticate" then
@@ -38,6 +38,11 @@ end
3838
- Edit a PAM config file and add a line using `pam_lua.so`, say `auth sufficient pam_lua.so script=/path/to/script.lua`
3939
- Note: If the script is incorrect, you might not be able to log in. If it contains backdoors, someone else might get in...
4040

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+
4146
## API
4247
- `pam.type`
4348
- The invoked module call type, one of the following:

0 commit comments

Comments
 (0)