.\" Title: pam_succeed_if .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot_2006\-08\-24_0226 .\" Date: 08/31/2006 .\" Manual: Linux\-PAM .\" Source: Linux\-PAM .\" .TH "PAM_SUCCEED_IF" "8" "08/31/2006" "Linux\-PAM" "Linux\-PAM" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" pam_succeed_if \- test account characteristics .SH "SYNOPSIS" .HP 18 \fBpam_succeed_if.so\fR [\fIflag\fR...] [\fIcondition\fR...] .SH "DESCRIPTION" .PP 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. .PP The module should be given one or more conditions as module arguments, and authentication will succeed only if all of the conditions are met. .SH "OPTIONS" .PP The following \fIflag\fRs are supported: .TP 3n \fBdebug\fR Turns on debugging messages sent to syslog. .TP 3n \fBuse_uid\fR Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated. .TP 3n \fBquiet\fR Don't log failure or success to the system log. .TP 3n \fBquiet_fail\fR Don't log failure to the system log. .TP 3n \fBquiet_success\fR Don't log success to the system log. .PP \fICondition\fRs are three words: a field, a test, and a value to test for. .PP Available fields are \fIuser\fR, \fIuid\fR, \fIgid\fR, \fIshell\fR, \fIhome\fR and \fIservice\fR: .TP 3n \fBfield < number\fR Field has a value numerically less than number. .TP 3n \fBfield <= number\fR Field has a value numerically less than or equal to number. .TP 3n \fBfield eq number\fR Field has a value numerically less equal to number. .TP 3n \fBfield >= number\fR Field has a value numerically greater than or equal to number. .TP 3n \fBfield > number\fR Field has a value numerically greater than number. .TP 3n \fBfield ne number\fR Field has a value numerically different from number. .TP 3n \fBfield = string\fR Field exactly matches the given string. .TP 3n \fBfield != string\fR Field does not match the given string. .TP 3n \fBfield =~ glob\fR Field matches the given glob. .TP 3n \fBfield !~ glob\fR Field does not match the given glob. .TP 3n \fBfield in item:item:...\fR Field is contained in the list of items separated by colons. .TP 3n \fBfield notin item:item:...\fR Field is not contained in the list of items separated by colons. .TP 3n \fBuser ingroup group\fR User is in given group. .TP 3n \fBuser notingroup group\fR User is not in given group. .TP 3n \fBuser innetgr netgroup\fR (user,host) is in given netgroup. .TP 3n \fBuser notinnetgr group\fR (user,host) is not in given netgroup. .SH "MODULE SERVICES PROVIDED" .PP All services are supported. .SH "RETURN VALUES" .TP 3n PAM_SUCCESS The condition was true. .TP 3n PAM_AUTH_ERR The condition was false. .TP 3n PAM_SERVICE_ERR A service error occured or the arguments can't be parsed as numbers. .SH "EXAMPLES" .PP To emulate the behaviour of \fIpam_wheel\fR, except there is no fallback to group 0: .sp .RS 3n .nf auth required pam_succeed_if.so quiet user ingroup wheel .fi .RE .PP 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. .sp .RS 3n .nf type [default=1 success=ignore] pam_succeed_if.so quiet uid > 500 type required othermodule.so arguments... .fi .RE .SH "SEE ALSO" .PP \fBglob\fR(7), \fBpam\fR(8) .SH "AUTHOR" .PP Nalin Dahyabhai