Skip to content
noname-systemsPublic
forked from RMTT/lua-pam

About

A module for lua to use PAM.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages