Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.767.166 Times

pam_envfeed 0.4

  Date Added: July 09, 2010  |  Visits: 662


Report Broken Link
Printer Friendly Version

Product Homepage
Download (71 downloads)

pam_envfeed is a PAM module that runs an external program, grabs its output, and then defines the environment variables this program has emitted. pam_envfeed is especially useful for dynamically setting up a PATH that depends on many circumstances (such as whether the user is root, or whether a directory exists or not). The module can be used as an auth, account or session module. I guess session is the best place to set environment variables, but YMMV. To do so, put a line like this into /etc/pam.d/system-auth or whatever files are relevant: session required /lib/security/ When the pam_envfeed module is invoked to set the credentials, do the account management or open the session, it launches the external program /sbin/pam_envfeed by default, however, a different program can be chosen with an argument to the module. The program can be a binary as well as a script. Dont forget the execute perms, and the #! line if its a script. The program has its standard input and standard error connected to /dev/null, the standard output is a pipe connected to the parent process, and no other file descriptors are open. The program receives four kinds of environment variables: PAM_* PAM_RHOST, PAM_RUSER, PAM_SERVICE, PAM_TTY and PAM_USER are defined to their equivalent in the PAM system. Only those for whom pam_get_item() successfully returned a non-NULL value are actually set, so some of these might be unset. USERINFO_* Since I found it quite difficult to get the home directory of the user whose name is contained in a shell variable in bash, I added password entry lookup into pam_envfeed. If getpwnam() is successful then data provided by this call is put into USERINFO_UID, USERINFO_GID, USERINFO_GECOS, USERINFO_HOME and USERINFO_SHELL. Furthermore the group id is also looked up and the group name is stored in USERINFO_GROUP if getgrgid() is successful. The users login name is not duplicated in these variables, use PAM_USER instead. This whole userinfo lookup can be disabled with the nouserinfo option, just in case you have troubles with getent/nss stuff or just dont want pam to use them here. ENV_* For all the real environment variables that the pamming process has, a counterpart with an ENV_ prefix is defined. E.g. if your authenticating applications has LC_ALL=hu_HU then youll have ENV_LC_ALL=hu_HU defined. PAMENV_* For all the pam environment variables that the pamming process has, a counterpart with a PAMENV_ prefix is defined. E.g. if has previously set DISPLAY=kenny:0.0 then youll have PAMENV_DISPLAY=kenny:0.0 defined. Example: This is a very simple example script. It only sets PATH and MAIL to probably their most standard values on Linux systems. #!/bin/bash p="$USERINFO_HOME/bin" if [ "$USERINFO_UID" = "0" ]; then p="$p:/usr/local/sbin:/sbin:/usr/sbin" fi p="$p:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin" echo -n PATH="$p" echo -ne 00 echo -n MAIL="/var/mail/$PAM_USER" See the example subdirectory for a more complex example..

Requirements: No special requirements
Platforms: Linux
Keyword: Defined Environment Environment Variables External Module Output Pam Pamenv Pamenvfeed Path Program System System Administration User Userinfo
Users rating: 0/10

License: Freeware Size: 17.41 KB
Utilities  -  pldap 0.2
Pldap short from PAM LDAP Module is an experimental attempt at writing a new LDAP authentication module for PAM. It is currently beta code, and only implements the basic elements of LDAP authentication. However, it does provide all the elements...
296.96 KB  
Utilities  -  pam_krb5_migrate 0.0.6
pam_krb5_migrate is a stackable authentication module that takes a username and password from an earlier module in the stack and attempts to transparently add the user to a Kerberos realm using the Kerberos 5 kadmin service. pam_krb5_migrate PAM...
40.96 KB  
Security Tools  -  pam_usbauth 0.3
pam_usbauth is a module for PAM allowing end-users to locally authenticate via USB storage devices. USBAuth currently supports user-dependent authentication via password-hashing as well as one-time-password mechanisms, which make the verification...
10.24 KB  
Modules  -  Drigg External Vote Button 6.x-1.1
This module is meant to work as an external vote button for scoops available inside a Drigg system.It builds upon the Drigg set of modules.It provides a javascript button to include in a page external to your Drupal site that will display either a...
20.48 KB  
Security Tools  -  pam_passwdqc 1.0.2
pam_passwdqc is a simple password strength checking module for PAM-aware password changing programs, such as passwd. In addition to checking regular passwords, it offers support for passphrases and can provide randomly generated ones. All...
30.72 KB  
Modules  -  Page Array 5.x-1.x-de
The pagearray module is a small (single function) helper module that can be used whenever there is a need to load the output of any Drupal path in data form. Based on the code in index.php, Page Array bypasses the theme('page') call, instead...
10 KB  
Libraries  -  Env::Path 0.18
Env::Path is a Perl module with advanced operations on path variables. SYNOPSIS use Env::Path; # basic usage my $manpath = Env::Path->MANPATH; $manpath->Append(/opt/samba/man); for ($manpath->List) { print $_, "n" }; # similar to above...
10.24 KB  
Information Lookup  -  Forge for SwordSearcher 3. 1. 2001
Forge is an external module build tool for SwordSearcher Bible Software. It is designed for users and publishers who need to be able to import a large amount of text into a SwordSearcher module without using SwordSearcher's internal user editor....
1.35 MB  
Modules  -  CAS Server 6.x-1.x-de
The CAS Server module turns a Drupal install into the centralauthentication system.The CAS Server module turns a Drupal install into the centralauthentication system. It makes your database the primary locationfor other systems to use for...
10 KB  
Development Editors  -  Expert Debugger 3.2
Expert Debugger is a free easy-to-use tool for debugging PHP scripts. Expert Debugger uses the DBG PHP Debugger and allow to debug scripts via network or on local computer. You can run scripts in step-by-step mode and to trace values of any...
1.83 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Utilities  -  LPAR2RRD 4.95-4
LPAR2RRD collects performance data and generates actual, historical and future trends utilization graphs of your virtual environment. It is agentless (it receives everything from the management stations like vCenter or HMC). The product supports...
2.25 MB  
Utilities  -  Nessconnect 1.0.2
Nessconnect is a GUI, CLI and API client for Nessus and Nessus compatible servers. With an improved user interface, it provides local session management, scan templates, report generation through XSLT, charts and graphs, and vulnerability trending.
819.2 KB  
Utilities  -  Dynamic Power Management 2.6.16
The Dynamic Power Management (DPM) project explores technologies to improve power conservation capabilities of platforms based on open source software. Of particular interest are techniques applicable to running systems, adjusting power parameters...
30.72 KB  
Utilities  -  Ethernet bridge tables
Ethernet bridge tables - Linux Ethernet filter for the Linux bridge. The 2.4-ebtables-brnf package contains the ebtables+bridge-nf patch. Be sure to check out the ebtables hp. This site also contains the arptables userspace tool.
40.96 KB  
Utilities  -  SaraB 1.0.0
SaraB works with DAR (Disk ARchive) to schedule and rotate backups on random-access media (i.e. hard drives, CDs, DVDs, Zip, etc. Basically anything except magnetic tapes.) This reduces hassle for the administrator by providing an automatic backup...
20.48 KB