Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
pam_sample.so.1
Syslog debugging information at the LOG_DEBUG level.
Sets the password to be "newone".
The first password is always good when used with the use_first_pass or try_first_pass option.
The first password is always bad when used with the use_first_pass or try_first_pass option.
Always returns PAM_AUTH_ERR.
Always returns PAM_SUCCESS.
Always returns PAM_IGNORE.
Use the user's initial password (entered when the user is authenticated to the first authentication module in the stack) to authenticate with the SAMPLE module. If the passwords do not match, or if this is the first authentication module in the stack, quit and do not prompt the user for a password. It is recommended that this option only be used if the SAMPLE authentication module is designated as optional in the pam.conf configuration file.
Use the user's initial password (entered when the user is authenticated to the first authentication module in the stack) to authenticate with the SAMPLE module. If the passwords do not match, or if this is the first authentication module in the stack, prompt the user for a password. The SAMPLE module pam_sm_setcred(3PAM) function always returns PAM_SUCCESS.
The option field syntax to limit access is shown below: allow= name[,name] allow= name [allow=name]
The example pam.conf show below permits only larry to login directly. rlogin is allowed only for don and larry. Once a user is logged in, the user can use su if the user are sam or eric.
login account require pam_sample.so.1 allow=larry |
dtlogin account require pam_sample.so.1 allow=larry |
rlogin account require pam_sample.so.1 allow=don allow=larry |
su account require pam_sample.so.1 allow=sam,eric |
The debug and nowarn options are also supported.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
MT Level MT-Safe with exceptions |