/usr/share/doc/pam/html
NameSizeModeActions
Linux-PAM_SAG.html91960644editdlrm
sag-author.html31110644editdlrm
sag-configuration-directory.html29660644editdlrm
sag-configuration-example.html55220644editdlrm
sag-configuration-file.html175190644editdlrm
sag-configuration.html30650644editdlrm
sag-copyright.html36170644editdlrm
sag-introduction.html44460644editdlrm
sag-module-reference.html381520644editdlrm
sag-overview.html79950644editdlrm
sag-pam_access.html181200644editdlrm
sag-pam_cracklib.html202710644editdlrm
sag-pam_debug.html80870644editdlrm
sag-pam_deny.html47040644editdlrm
sag-pam_echo.html57520644editdlrm
sag-pam_env.html127960644editdlrm
sag-pam_exec.html83710644editdlrm
sag-pam_faildelay.html45900644editdlrm
sag-pam_filter.html93420644editdlrm
sag-pam_ftp.html62030644editdlrm
sag-pam_group.html101360644editdlrm
sag-pam_issue.html63780644editdlrm
sag-pam_keyinit.html70150644editdlrm
sag-pam_lastlog.html85240644editdlrm
sag-pam_limits.html181140644editdlrm
sag-pam_listfile.html105340644editdlrm
sag-pam_localuser.html54460644editdlrm
sag-pam_loginuid.html52090644editdlrm
sag-pam_mail.html77620644editdlrm
sag-pam_mkhomedir.html61960644editdlrm
sag-pam_motd.html77530644editdlrm
sag-pam_namespace.html206400644editdlrm
sag-pam_nologin.html53320644editdlrm
sag-pam_permit.html43040644editdlrm
sag-pam_pwhistory.html84760644editdlrm
sag-pam_rhosts.html64040644editdlrm
sag-pam_rootok.html51090644editdlrm
sag-pam_securetty.html64800644editdlrm
sag-pam_selinux.html83130644editdlrm
sag-pam_shells.html42610644editdlrm
sag-pam_succeed_if.html91540644editdlrm
sag-pam_time.html97250644editdlrm
sag-pam_timestamp.html68890644editdlrm
sag-pam_umask.html63180644editdlrm
sag-pam_unix.html150560644editdlrm
sag-pam_userdb.html85850644editdlrm
sag-pam_warn.html45690644editdlrm
sag-pam_wheel.html71810644editdlrm
sag-pam_xauth.html84200644editdlrm
sag-security-issues-other.html29930644editdlrm
sag-security-issues-wrong.html29630644editdlrm
sag-security-issues.html21610644editdlrm
sag-see-also.html22830644editdlrm
sag-text-conventions.html31870644editdlrm
Edit: /usr/share/doc/pam/html/sag-pam_succeed_if.html (9154B)
6.31. pam_succeed_if - test account characteristics

6.31. pam_succeed_if - test account characteristics

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

6.31.1. DESCRIPTION

pam_succeed_if.so is designed to succeed or fail authentication based on characteristics of the account belonging to the user being authenticated or values of other PAM items. 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.

6.31.2. 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, ruser, rhost, tty 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.

6.31.3. MODULE TYPES PROVIDED

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

6.31.4. 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.

6.31.5. 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...
    

6.31.6. AUTHOR

Nalin Dahyabhai <nalin@redhat.com>