Giter VIP home page Giter VIP logo

lua-pam's Introduction

lua-pam

A module for lua to use PAM.

Compile

cmake . -B build
cd build
make

Installation through package manager

Arch Linux

The package lua-pam-git can be installed from the Arch Linux User Repository using the following command. The command assumes your package manager is yay.

yay -S lua-pam-git

The file liblua_pam.so is installed into /usr/lib/lua-pam/.

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 -llua

Check for lua libraries in /usr/lib. If a library exists like liblua5.4.so or libluajit-5.1.so, change lua in CMakeLists.txt to use the library you have installed (in the example libraries before, this would be lua5.4 and luajit-5.1 respectively).

cannot find lua.hpp

Make sure that lua.hpp exists on your machine, and then create a soft link to the /usr/include directory if it isn't there already. You can change CMakeLists.txt to include your own directory which contains lua.hpp.

cannot find liblua.so

Make sure the file exists on your machine. A package will need to be installed on some distros. For distros such as Debian/Ubuntu, you should install liblua-dev.

cannot find pam_appl.hpp on Ubuntu/Debian

Install libpam0g-dev.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.