Skip to content

noname-systems/lua-pam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-pam

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.

Complile

cmake . -B build -DLUA=lua5.3
cd build
make

Availible values for LUA variable: lua5.2, lua5.3(default), lua5.4, luajit. To compile with luajit, you need to compile luajit in lua53compat

Installation

make install

The file liblua_pam.so is installed into /usr/lib64/lua/{LUA_VERSION}.

Usage

-- add the lib to cpath by yourself

local pam = require("liblua_pam")
local auth = pam.auth_current_user(password)

if auth
then
    print("Success!")
end

Troubleshooting

cannot find lua.hpp or liblua.so

Make 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

cannot find pam_appl.hpp on Ubuntu/Debian

Install libpam0g-dev

About

A module for lua to use PAM.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 41.6%
  • Shell 29.9%
  • CMake 28.5%