PAM policy

submitconfirmuserpam

Description

The submitconfirmuserpam() function controls whether or not a user must enter a password before the current task request is accepted. Password authentication and account management is performed by PAM and name of the PAM service must be provided. When this function is set, the user submitting the request is prompted for the password that is associated with the submit host user name set in this function.

When used, this policy function overrides the pampasswordservice setting in the submit host’s settings file and works even if the PAM setting is set to no.

ℹ️

Note

The user’s failure to provide the correct password does not automatically result in a rejection of the secured task request. The policy should examine the result of the submitconfirmuserpam() function and respond accordingly.

Syntax

result = submitconfirmuserpam(user, pampasswordservice[, prompt[, attempts[, name, time]]]);

Arguments

NameDescription
userRequired. A string that contains a user name that exists on the submit host.
pampasswordserviceRequired. The name of the PAM service that you want to use for PAM password authentication and account management.
promptOptional. The prompt text for the password. The default is Enter password for .
attemptsOptional. The number of attempts that the user has to enter the correct password. The default value for attempts is 3.
nameOptional. The name of a persistent variable whose expiration determines the reauthenticate grace period. The value must start with a dollar sign ($), otherwise no grace period is set and submitconfirmuserpam() automatically prompts for a password.
If name is specified, the time parameter (below) is required.
timeRequired if name argument (above) is specified). The expiry date (number of seconds) after which a prompt is forced. submitconfirmuserpam() returns true without prompting the user for a password if the persistent variable, defined by the name argument, exists and its expiry date, defined by time, has not been exceeded.

Return values

NameDescription
truePassword matched.
falsePassword did not match or invalid password service.

Example

result = submitconfirmuserpam(user, "pbulpass", "Please enter the user's  password:", 3);
if (result != 1) {reject;}

In this example,

submitconfirmuserpam(user, "pbulpass", "Passwd for "+user+": ", 3, "$gpvar5", 300);

a persistent variable gpvar5 is created at initial successful user authentication and for 5 minutes (300 seconds) thereafter, the user is not prompted for a password.

ℹ️

Note

For more information, see the following

submitconfirmuser

Persistent Variable Functions and Procedures


©2003-2025 BeyondTrust Corporation. All Rights Reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.