Debian Codegraph @

etc/README.pam_script

raw
1 The pam_script tool
2 -------------------
3
4 Pam-script confusingly provides the pam_script tool for running generic
5 pam-script programs in ./pam-script.d/ or for performing some basic
6 administrative functions like creating or removing symbolic links to
7 a pam-script enabled script or program. Read the other READMEs or man
8 pages for further info regarding the attributes of a pam-script program.
9 This README will focus on the pam_script tool and its role in the
10 pam-script universe.
11
12 The pam_script tool serves two purposes. Primarily running scripts
13 in ./pam-script.d/, and secondly, managing the symbolic links in
14 ./pam-script.d/ or elsewhere of the various PAM module-types.
15
16 The various PAM module-types are:
17 auth - authorization
18 acct - account
19 passwd - password changes
20 ses_open - session start
21 ses_close - session end
22
23 If the pam_script tool is set-up with the various symbolic links as
24 described in the README, then it will run the appropriate scripts
25 in the ./pam-script.d/ directory. For example, say the PAM stack
26 invoked pam-script with a PAM module-type of acct, then pam-script
27 will run pam_script_acct, which is a symbolic link to pam_script.
28 The pam_script tool sees that it was called as pam_script_acct and
29 then runs all scripts in ./pam-script.d/ that end with _acct.
30 Then returns 0 if all ran successfully, else 1 if any one of them
31 failed with a non-zero return status.
32
33 In addition, pam_script will set the PAM_SCRIPT_STATUS environment
34 variable with the overall exit status so far, so the script can
35 choose whether to perform its action or not. If PAM_SCRIPT_STATUS
36 is already non-zero then there may be no point to run any further.
37 However, some scripts may need to be run whether the PAM_SCRIPT_STATUS
38 is non-zero or not.
39
40 Also, the command line arguments passed to pam-script (in the
41 pam-script.conf) are also passed on to all the scripts invoked from
42 within ./pam-script.d/.
43
44 Link Administration
45 -------------------
46
47 The pam_script tool can create all or some of the needed symbolic
48 links. The goal is to allow a third party package to drop a script
49 or program in ./pam-script.d/, then create the set of symbolic links
50 within the same directory so it may become part of the PAM stack
51 via pam-script without the necessity of crafting a full PAM module.
52
53 The program dropped into ./pam-script.d/ should check how it is called
54 and act accordingly. Check the provided example scripts, on how to
55 do this.
56
57 Report problems/bugs to R.K. Owen <[email protected]>
58
59 COPYRIGHT AND LICENCE
60
61 AUTHOR: R K Owen, Ph.D., <[email protected]>
62 of the National Energy Research Scientific Computing Center (NERSC),
63 a Division of the Lawrence Berkeley National Laboratory (LBL),
64 funded by the U.S. Department of Energy.
65
66 Copyright (C) 2008 The Regents of the University of California
67
68 This is free software; you can redistribute it
69 and/or modify it under the terms of the GNU General
70 Public License as published by the Free Software Foundation;
71 version 2.0 of the License.
72