A module for lua to use PAM. Fork from https://github.com/RMTT/lua-pam. Fixed version to compile with different versions of Lua.
Also contain ebuild for Gentoo.
cmake . -B build -DLUA=lua5.3
cd build
makeAvailible values for LUA variable: lua5.2, lua5.3(default), lua5.4, luajit. To compile with luajit, you need to compile luajit in lua53compat
make installThe file liblua_pam.so is installed into /usr/lib64/lua/{LUA_VERSION}.
-- add the lib to cpath by yourself
local pam = require("liblua_pam")
local auth = pam.auth_current_user(password)
if auth
then
print("Success!")
endMake sure the file exists on your machine,it's need install some package on some distros,such as Debian/Ubuntu,you should install liblua-dev
Install libpam0g-dev