PAM_SUCCEED_IF



PAM_SUCCEED_IF


NAME
pam_succeed_if − test account characteristics

SYNOPSIS

pam_succeed_if.so [flag...] [condition...]

DESCRIPTION

pam_succeed_if.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated. One use is to select whether to load other modules based on this test.

The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met.

OPTIONS
The following flags are supported:

debug

Turns on debugging messages sent to syslog.

use_uid

Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated.

quiet

Don´t log failure or success to the system log.

quiet_fail

Don´t log failure to the system log.

quiet_success

Don´t log success to the system log.

audit

Log unknown users to the system log.

Conditions are three words: a field, a test, and a value to test for.

Available fields are user, uid, gid, shell, home and service:

field < number

Field has a value numerically less than number.

field <= number

Field has a value numerically less than or equal to number.

field eq number

Field has a value numerically equal to number.

field >= number

Field has a value numerically greater than or equal to number.

field > number

Field has a value numerically greater than number.

field ne number

Field has a value numerically different from number.

field = string

Field exactly matches the given string.

field != string

Field does not match the given string.

field =~ glob

Field matches the given glob.

field !~ glob

Field does not match the given glob.

field in item:item:...

Field is contained in the list of items separated by colons.

field notin item:item:...

Field is not contained in the list of items separated by colons.

user ingroup group

User is in given group.

user notingroup group

User is not in given group.

user innetgr netgroup

(user,host) is in given netgroup.

user notinnetgr group

(user,host) is not in given netgroup.

MODULE TYPES PROVIDED
All module types (account, auth, password and session) are provided.

RETURN VALUES
PAM_SUCCESS

The condition was true.

PAM_AUTH_ERR

The condition was false.

PAM_SERVICE_ERR

A service error occurred or the arguments can´t be parsed correctly.

EXAMPLES
To emulate the behaviour of pam_wheel, except there is no fallback to group 0:

auth required pam_succeed_if.so quiet user ingroup wheel

Given that the type matches, only loads the othermodule rule if the UID is over 500. Adjust the number after default to skip several rules.

type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500
type required othermodule.so arguments...

SEE ALSO
glob
(7), pam(8)

AUTHOR
Nalin Dahyabhai <nalin@redhat.com>






Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.