• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..24-Feb-201414

pam_env.8H A D26-Feb-20133.6 KiB

pam_env.cH A D26-Feb-201324.6 KiB

pam_env.conf-exampleH A D26-Feb-20132.8 KiB

READMEH A D26-Feb-20132.8 KiB

README

1# $Date: 2002/03/27 02:36:24 $
2# $Author: bbraun $
3# $Id: README,v 1.4 2002/03/27 02:36:24 bbraun Exp $
4#
5# This is the configuration file for pam_env, a PAM module to load in 
6# a configurable list of environment variables for a 
7# 
8# The original idea for this came from Andrew G. Morgan ...
9#<quote>
10#   Mmm. Perhaps you might like to write a pam_env module that reads a
11#   default environment from a file? I can see that as REALLY
12#   useful... Note it would be an "auth" module that returns PAM_IGNORE
13#   for the auth part and sets the environment returning PAM_SUCCESS in
14#   the setcred function...
15#</quote>
16#
17# What I wanted was the REMOTEHOST variable set, purely for selfish
18# reasons, and AGM didn't want it added to the SimpleApps login
19# program (which is where I added the patch). So, my first concern is
20# that variable, from there there are numerous others that might/would
21# be useful to be set: NNTPSERVER, LESS, PATH, PAGER, MANPAGER .....
22#
23# Of course, these are a different kind of variable than REMOTEHOST in
24# that they are things that are likely to be configured by
25# administrators rather than set by logging in, how to treat them both
26# in the same config file?
27#
28# Here is my idea: 
29#
30# Each line starts with the variable name, there are then two possible
31# options for each variable DEFAULT and OVERRIDE. 
32# DEFAULT allows and administrator to set the value of the
33# variable  to some default value, if none is supplied then the empty
34# string is assumed. The OVERRIDE option tells pam_env that it should
35# enter in its value (overriding the default value) if there is one
36# to use. OVERRIDE is not used, "" is assumed and no override will be
37# done. 
38#
39# VARIABLE   [DEFAULT=[value]]  [OVERRIDE=[value]]
40#
41# (Possibly non-existent) environment variables may be used in values
42# using the ${string} syntax and (possibly non-existent) PAM_ITEMs may
43# be used in values using the @{string} syntax. Both the $ and @
44# characters can be backslash escaped to be used as literal values
45# values can be delimited with "", escaped " not supported.
46#
47#
48# First, some special variables
49#
50# Set the REMOTEHOST variable for any hosts that are remote, default
51# to "localhost" rather than not being set at all
52REMOTEHOST	DEFAULT=localhost OVERRIDE=@{PAM_RHOST}
53#
54# Set the DISPLAY variable if it seems reasonable 
55DISPLAY		DEFAULT=${REMOTEHOST}:0.0 OVERRIDE=${DISPLAY}
56#
57#
58#  Now some simple variables
59#
60PAGER		DEFAULT=less
61MANPAGER	DEFAULT=less
62LESS		DEFAULT="M q e h15 z23 b80"
63NNTPSERVER	DEFAULT=localhost
64PATH		DEFAULT=${HOME}/bin:/usr/local/bin:/bin\
65:/usr/bin:/usr/local/bin/X11:/usr/bin/X11
66#
67# silly examples of escaped variables, just to show how they work.
68#
69DOLLAR		DEFAULT=\$
70DOLLARDOLLAR	DEFAULT=	OVERRIDE=\$${DOLLAR}
71DOLLARPLUS	DEFAULT=\${REMOTEHOST}${REMOTEHOST}
72ATSIGN		DEFAULT=""	OVERRIDE=\@
73