'\" te .\" Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. .TH pam_list 5 "22 May 2012" "SunOS 5.11" "Standards, Environments, and Macros" .SH NAME pam_list \- PAM account management module for UNIX .SH SYNOPSIS .LP .nf pam_list.so.1 .fi .SH DESCRIPTION .sp .LP The \fBpam_list\fR module implements \fBpam_sm_acct_mgmt\fR(3PAM), which provides functionality to the PAM account management stack. The module provides functions to validate that the user's account is valid on this host based on a list of users and/or netgroups in the given file. The users and netgroups are separated by newline character. Netgroups are specified with character '@' as prefix before name of netgroup in the list. The maximum line length is 1023 characters. .sp .LP The username is the value of \fBPAM_USER\fR. The host is the value of \fBPAM_RHOST\fR or, if \fBPAM_RHOST\fR is not set, the value of the localhost as returned by \fBgethostname\fR(3C) is used. .sp .LP If neither of the \fBallow\fR, \fBdeny\fR, or \fBcompat\fR options are specified, the module will look for +/- entries in the local \fB/etc/passwd\fR file. If this style is used, \fBnsswitch.conf\fR(4) must not be configured with \fBcompat\fR for the \fBpasswd\fR database. If no relevant +/- entry exists for the user, \fBpam_list\fR is not participating in result. .sp .LP If \fBcompat\fR option is specified then the module will look for +/- entries in the local \fB/etc/passwd\fR file. Other entries in this file will be counted as + entries. If no relevant entry exits for the user, \fBpam_list\fR will deny the access. .sp .LP The following options can be passed to the module: .sp .ne 2 .mk .na \fB\fBallow=\fR\fR .ad .RS 19n .rt The full pathname to a file of allowed users and/or netgroups. Only one of \fBallow=\fR or \fBdeny=\fR can be specified. .RE .sp .ne 2 .mk .na \fB\fBcompat\fR\fR .ad .RS 19n .rt Activate \fBcompat\fR mode. .RE .sp .ne 2 .mk .na \fB\fBdeny=\fR\fR .ad .RS 19n .rt The full pathname to a file of denied users and/or netgroups. Only one of \fBdeny=\fR or \fBallow=\fR can be specified. .RE .sp .ne 2 .mk .na \fB\fBdebug\fR\fR .ad .RS 19n .rt Provide \fBsyslog\fR(3C) debugging information at the \fBLOG_AUTH\fR | \fBLOG_DEBUG\fR level. .RE .sp .ne 2 .mk .na \fB\fBuser\fR\fR .ad .RS 19n .rt The module should only perform netgroup matches on the username. This is the default option. .RE .sp .ne 2 .mk .na \fB\fBnouser\fR\fR .ad .RS 19n .rt The username should not be used in the netgroup match. .RE .sp .ne 2 .mk .na \fB\fBhost\fR\fR .ad .RS 19n .rt Only the host should be used in netgroup matches. .RE .sp .ne 2 .mk .na \fB\fBnohost\fR\fR .ad .RS 19n .rt The hostname should not be used in netgroup matches. .RE .sp .ne 2 .mk .na \fB\fBnorole\fR\fR .ad .RS 19n .rt Return \fBPAM_IGNORE\fR if the account (\fBPAM_USER\fR) is a role. This is the default. .RE .sp .ne 2 .mk .na \fB\fBrole\fR\fR .ad .RS 19n .rt Evaluate the rules even if \fBPAM_USER\fR is a role account. .RE .sp .ne 2 .mk .na \fB\fBuser_host_exact\fR\fR .ad .RS 19n .rt The user and hostname must be in the same netgroup. .RE .SH ERRORS .sp .LP The following error values are returned: .sp .ne 2 .mk .na \fB\fBPAM_SERVICE_ERR\fR\fR .ad .RS 20n .rt An invalid set of module options was specified in the PAM configuration (see\fBpam.conf\fR(4)) for this module, or the \fBuser/netgroup\fR file could not be opened. .RE .sp .ne 2 .mk .na \fB\fBPAM_BUF_ERR\fR\fR .ad .RS 20n .rt A memory buffer error occurred. .RE .sp .ne 2 .mk .na \fB\fBPAM_IGNORE\fR\fR .ad .RS 20n .rt The module is ignored, as it is not participating in the result. .RE .sp .ne 2 .mk .na \fB\fBPAM_PERM_DENIED\fR\fR .ad .RS 20n .rt The user is not on the allow list or is on the deny list. .RE .sp .ne 2 .mk .na \fB\fBPAM_SUCCESS\fR\fR .ad .RS 20n .rt The account is valid for use at this time. .RE .sp .ne 2 .mk .na \fB\fBPAM_USER_UNKNOWN\fR\fR .ad .RS 20n .rt No account is present for the user .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing \fBpam_list\fR in default mode .sp .LP The changes to \fB/etc/pam.conf\fR would be: .sp .in +2 .nf other account requisite pam_roles.so.1 other account required pam_unix_account.so.1 other account required pam_list.so.1 .fi .in -2 .sp .LP The equivalent PAM configuration in \fB/etc/pam.d/\fR would be the following entries in \fB/etc/pam.d/other\fR: .sp .in +2 .nf account requisite pam_roles.so.1 account required pam_unix_account.so.1 account required pam_list.so.1 .fi .in -2 .sp .LP In the case of \fBdefault\fR mode or \fBcompat\fR mode, the important lines in \fB/etc/passwd\fR appear as follows: .sp .in +2 .nf +loginname - user is approved -loginname - user is disapproved +@netgroup - netgroup members are approved -@netgroup - netgroup members are disapproved .fi .in -2 .LP \fBExample 2 \fRUsing \fBpam_list\fR with allow file .sp .LP The changes to \fB/etc/pam.conf\fR would be: .sp .in +2 .nf other account requisite pam_roles.so.1 other account required pam_unix_account.so.1 other account required pam_list.so.1 allow=/etc/users.allow .fi .in -2 .sp .LP The equivalent PAM configuration in \fB/etc/pam.d/\fR would be the following entries in \fB/etc/pam.d/other\fR: .sp .in +2 .nf account requisite pam_roles.so.1 account required pam_unix_account.so.1 account required pam_list.so.1 allow=/etc/users.allow .fi .in -2 .sp .LP \fB/etc/users.allow\fR contains: .sp .in +2 .nf root localloginname remoteloginname @netgroup .fi .in -2 .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe with exceptions .TE .sp .LP The interfaces in \fBlibpam\fR(3LIB) are MT-Safe only if each thread within the multithreaded application uses its own PAM handle. .SH SEE ALSO .sp .LP \fBpam\fR(3PAM), \fBpam_authenticate\fR(3PAM), \fBpam_sm_acct_mgmt\fR(3PAM), \fBsyslog\fR(3C), \fBlibpam\fR(3LIB), \fBnsswitch.conf\fR(4), \fBpam.conf\fR(4), \fBattributes\fR(5)