||Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
|(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and bastardization of classic Unix|
|Authentication and Accounts Security||Recommended Books||Linux_PAM|
Suse 10 comes with the complicated cornucopia of 64-bit PAM modules (located in /lib64/security) including some exotic like pam_homecheck.so, pam_wheel,
-rwxr-xr-x 1 root root 13648 May 3 2007 pam_access.so -rwxr-xr-x 1 root root 19440 May 3 2007 pam_chroot.so -rwxr-xr-x 1 root root 12704 May 3 2007 pam_cracklib.so -rwxr-xr-x 1 root root 7552 May 3 2007 pam_debug.so -rwxr-xr-x 1 root root 4648 May 3 2007 pam_deny.so -rwxr-xr-x 1 root root 15552 May 3 2007 pam_devperm.so -rwxr-xr-x 1 root root 7368 May 3 2007 pam_echo.so -rwxr-xr-x 1 root root 12064 May 3 2007 pam_env.so -rwxr-xr-x 1 root root 8928 May 3 2007 pam_exec.so drwxr-xr-x 2 root root 4096 Oct 17 14:33 pam_filter -rwxr-xr-x 1 root root 13024 May 3 2007 pam_filter.so -rwxr-xr-x 1 root root 6952 May 3 2007 pam_ftp.so -rwxr-xr-x 1 root root 12792 May 3 2007 pam_group.so -rwxr-xr-x 1 root root 8872 May 3 2007 pam_homecheck.so -rwxr-xr-x 1 root root 9080 May 3 2007 pam_issue.so -rwxr-xr-x 1 root root 9432 May 3 2007 pam_lastlog.so -rwxr-xr-x 1 root root 13320 May 3 2007 pam_limits.so -rwxr-xr-x 1 root root 11072 May 3 2007 pam_listfile.so -rwxr-xr-x 1 root root 5976 May 3 2007 pam_localuser.so -rwxr-xr-x 1 root root 6896 May 3 2007 pam_loginuid.so -rwxr-xr-x 1 root root 9680 May 3 2007 pam_mail.so -rwxr-xr-x 1 root root 8968 May 3 2007 pam_make.so -rwxr-xr-x 1 root root 17952 May 3 2007 pam_mkhomedir.so -rwxr-xr-x 1 root root 7504 May 3 2007 pam_mktemp.so -rwxr-xr-x 1 root root 5688 May 3 2007 pam_motd.so -rwxr-xr-x 1 root root 66824 May 3 2007 pam_ncp_auth.so -rwxr-xr-x 1 root root 6872 May 3 2007 pam_nologin.so -rwxr-xr-x 1 root root 16032 Apr 27 2007 pam_opensc.so -rwxr-xr-x 1 root root 32600 Jun 16 2006 pam_opie.so -rwxr-xr-x 1 root root 44088 May 3 2007 pam_passwdqc.so -rwxr-xr-x 1 root root 5072 May 3 2007 pam_permit.so -rwxr-xr-x 1 root root 32952 May 3 2007 pam_pwcheck.so -rwxr-xr-x 1 root root 7984 Jun 16 2006 pam_resmgr.so -rwxr-xr-x 1 root root 6072 May 3 2007 pam_rhosts.so -rwxr-xr-x 1 root root 11352 May 3 2007 pam_rhosts_auth.so -rwxr-xr-x 1 root root 4856 May 3 2007 pam_rootok.so -rwxr-xr-x 1 root root 18056 May 4 2007 pam_rpasswd.so -rwxr-xr-x 1 root root 7264 May 3 2007 pam_securetty.so -rwxr-xr-x 1 root root 5976 May 3 2007 pam_shells.so -rwxr-xr-x 1 root root 12528 May 3 2007 pam_stress.so -rwxr-xr-x 1 root root 12928 May 3 2007 pam_succeed_if.so -rwxr-xr-x 1 root root 11784 May 3 2007 pam_tally.so -rwxr-xr-x 1 root root 11312 May 3 2007 pam_time.so -rwxr-xr-x 1 root root 8448 May 3 2007 pam_umask.so -rwxr-xr-x 2 root root 55872 May 3 2007 pam_unix.so -rwxr-xr-x 2 root root 55872 May 3 2007 pam_unix2.so -rwxr-xr-x 4 root root 42712 May 3 2007 pam_unix_acct.so -rwxr-xr-x 4 root root 42712 May 3 2007 pam_unix_auth.so -rwxr-xr-x 4 root root 42712 May 3 2007 pam_unix_passwd.so -rwxr-xr-x 4 root root 42712 May 3 2007 pam_unix_session.so -rwxr-xr-x 1 root root 11080 May 3 2007 pam_userdb.so -rwxr-xr-x 1 root root 6192 May 3 2007 pam_userpass.so -rwxr-xr-x 1 root root 5736 May 3 2007 pam_warn.so -rwxr-xr-x 1 root root 7248 May 3 2007 pam_wheel.so -rwxr-xr-x 1 root root 15496 May 3 2007 pam_xauth.so
A list from The PAM reference guide for available modules:
Common Pam modules:
pam_env.so -- Sets environment variables
for PAM using the settings in /etc/security/pam_env.conf.
Here is an example of user the ftpusers file to deny access to those listed in the file:
# deny ftp-access to users listed in the /etc/ftpusers file
ftp auth required pam_listfile.so onerr=succeed item=user sense=deny file=/etc/ftpusers
pam_mail -- [authentication (credential);session (open)]
This module provides the “you have new mail” service to the user. It can be plugged into any application that has credential hooks. It gives a single message indicating the newness of any mail it finds in the user's mail folder. This module also sets the Linux-PAM environment variable, MAIL, to the user's mail directory.
If the file /etc/nologin exists, only root is allowed to log in; other
users are turned away with an error message. All users (root or otherwise)
are shown the contents of /etc/nologin. If the file /etc/nologin does
not exist, this module succeeds silently. If /etc/nologin exists, its
contents are displayed to the user. Michael K. Johnson <johnsonm
Less common PAM modules
Tcl PAM provides a Tcl interface to Pluggable Authentication Modules as implemented in Linux. It implements a Tcl package that exports the client-side functionality of PAM to the Tcl programming language. This allows Tcl scripts to use PAM for authentication. Pluggable authentication modules or PAM are a mechanism to integrate multiple low-level authentication schemes into a high-level application programming interface (API), which allows for programs that rely on authentication to be written independently of the underlying authentication scheme.
pam_require is a simple Plugable Authentication Module (PAM) for Linux (and maybe other systems which use PAM). It is an account module that allows you to require a special group or user to access a service.
pam_script is a PAM that executes a script at the start and end of a session. Any PAM-aware application can use the module to perform arbitrary operations. It was originally written for cleaning up when a user logs out.
Izak Burger [contact developer]
Author's note: PAM (Pluggable Authentication Modules) is a flexible infrastructure for controlling authentication on Linux systems. In this recipe, taken from Chapter 4, "Authentication Techniques and Infrastructures," we show you how to restrict authentication to a given set of users by creating an access control list.
You would like to apply an access control list (ACL) to an existing service that does not explicitly support ACLs (e.g.,
First, make sure the server in question uses PAM for authentication, and find out which PAM service name it uses. This may be in the server documentation, or it may be clear from examining the server itself and perusing the contents of /etc/pam.d. For example, suppose you're dealing with the IMAP mail server. First notice that there is a file called /etc/pam.d/imap. Further, the result of:
# locate imapd ... /usr/sbin/imapd
shows that the IMAP server is in /usr/sbin/imapd, and:
# ldd /usr/sbin/imapd libpam.so.0 => /lib/libpam.so.0 (0x40027000) ...
shows that the server is dynamically linked against the PAM library (libpam.so), also suggesting that it uses PAM. In fact, the Red Hat 8.0 IMAP server uses PAM via that service name and control file ("imap").
Continuing with this example, create an ACL file for the IMAP service, let's say /etc/imapd.acl, and make sure it is not world-writable:
# chmod o-w /etc/imapd.acl
Edit this file, and place in it the usernames of those accounts authorized to use the IMAP server, one name per line. Then, add the following to /etc/pam.d/imap:
account required /lib/security/pam_listfile.so file=/etc/imapd.acl \ item=user sense=allow onerr=fail
With this configuration, only those users listed in the ACL file will be allowed access to the IMAP service. If the ACL file is missing, PAM will deny access for all accounts.
The PAM "listfile" module is actually even more flexible than we've indicated. Entries in your ACL file can be not only usernames (
item=user), but also:
- Terminal lines (
- Remote host (
- Remote user (
- Group membership (
- Login shell (
sensekeyword determines how the ACL file is interpreted.
sense=allowmeans that access will be allowed only if the configured
itemis in the file, and denied otherwise.
sense=denymeans the opposite: access will be denied only if the item is in the file, and allowed otherwise.
onerrkeyword indicates what to do if some unexpected error occurs during PAM processing of the listfile module - for instance, if the ACL file does not exist. The values are
failis a more conservative option from a security standpoint, but can also lock you out of your system because of a configuration mistake!
], limits the restriction in question to apply only to particular users or groups. This is intended for use with the
shellitems. For example, using
[email protected]would restrict access to connections from hosts listed in the ACL file, and furthermore only to local accounts in the
To debug problems with PAM modules, look for PAM-specific error messages in /var/log/messages and /var/log/secure. (If you don't see the expected messages, check your system logger configuration. [Recipe 9.28])
Note that not all module parameters have defaults. Specifically, the
senseparameters must be supplied; if not, the module will fail with an error message like:
Dec 2 15:49:21 localhost login: PAM-listfile: Unknown sense or sense not specified
You generally do not need to restart servers using PAM: they usually re-initialize the PAM library for every authentication and reread your changed files. However, there might be exceptions.
There is no standard correspondence between a server's name and its associated PAM service. For instance, logins via Telnet are actually mediated by /bin/login, and thus use the
loginservice. The SSH server
sshduses the same-named PAM service (
sshd), whereas the IMAP server
imap(with no "d") PAM service. And many services in turn depend on other services, notably
See /usr/share/doc/pam-*/txts/README.pam_listfile for a list of parameters to tweak.
Google matched content
The Linux-PAM Administration and Developer Guides
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to to buy a cup of coffee for authors of this site|
Last modified: March 12, 2019