GithubHelp home page GithubHelp logo

manish364824 / pam_script Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeroennijhof/pam_script

0.0 0.0 0.0 136 KB

PAM script module will allow you to execute scripts during authorization, password changes and sessions. This is very handy if your current security application has no pam support but is accessable with perl or other scripts.

License: GNU General Public License v2.0

Shell 12.99% Perl 33.61% C 33.65% Makefile 6.17% M4 6.20% Roff 7.38%

pam_script's Introduction

README 

PAM-script has been written by Jeroen Nijhof <[email protected]>
with packaging and some modifications by R.K. Owen <[email protected]>.

Description:
	PAM-script allows you to execute scripts during authorization,
	passwd changes, or session opening or closing.

	So if you need extra work done after login you can use this pam
	module to execute a session script.

Options to pam_script.so:
	onerr=(success|fail) - default behavior if the module can not find
	or execute the various pam-scripts.  The default is 'fail'.

	dir=/some/path - where to find the pam-scripts listed below.

	All options are passed on to the script commandlines and those not
	intercepted by PAM may be used to modify the script behavior.

Module-type and Scripts:
	auth:		pam_script_auth		- username/password handshake
	account:	pam_script_acct		- non-auth account management
	passwd:		pam_script_passwd	- changing a password
	session:	pam_script_ses_open	- actions performed before and
			pam_script_ses_close	  after a session

	All the scripts will be passed several environment variables:
	  PAM_USER, PAM_RUSER, PAM_RHOST, PAM_SERVICE, PAM_AUTHTOK,
	  PAM_OLDAUTHTOK, PAM_TTY, and PAM_TYPE referring to the module-type.
	Whether the variable has a non-null value or not depends on the
	context.

Pam.conf example:

	--- start pam.conf ---
	ssh auth	required	pam_script.so
	ssh session	required	pam_script.so
	ssh passwd	required	pam_script.so
	--- end pam.conf ---

or as an extra step (here pam_script.so is optional because this application
does some extra logging and doesn't want access denied if there is a problem):

	--- start pam.conf ---
	ssh auth	required	pam_unix.so
	ssh auth	optional	pam_script.so
	ssh session	required	pam_unix.so
	ssh session	optional	pam_script.so
	ssh passwd	required	pam_unix.so
	ssh passwd	optional	pam_script.so
	--- end pam.conf ---

This example application has the pam_script_auth script check a database
and return non-zero if the user should not be granted access.  If the
script does not exist or is not executable at all levels (chmod a+x)
then deny access.
	ssh auth	required	pam_unix.so
	ssh auth	required	pam_script.so onerr=fail

Debugging:
Get the pamtest.c program from the pam-dotfile distribution and it can be
used to step through the module.

Examples:
Look at the README.examples file, which may be located under
/usr/share/doc/libpam-script/ for a Debian derived distribution.

Problem/BUGS report:
If you find any bugs or problems just mail me
	Jeroen Nijhof <[email protected]>

pam_script's People

Contributors

jeroennijhof avatar mgerstner avatar hagihala avatar alt36 avatar manish364824 avatar

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.