service operation [operation ...]
pamtester requires at least three arguments to operate.
The first argument is service,
which provides the name of the service. The second one is
user, which provides the name of
the user to handle with PAM. The last one is
specifies the operation for PAM to perform. For example, the
following set of arguments
pamtester login root open_session
instructs the session modules registered to the "login" service
to open the session for user "root".
Supported operations are listed below:
Authenticate user. A
conversation may subsequently take place to prompt user
input for necessary authentication information.
Perform account management on
Open a new session for
Close the current session for
Change the authentication token currently assigned to
user. A conversation
may subsequently take place to prompt user input for
necessary authentication information.
Note that it is probable some operations eventually need
additional privileges to fulfill the request, depending on the
More than one operation may be specified at once. In that case the
operations are done in the order of occurrence.
Any operation may also be followed
by the option flags that are
provided between the pair of parenthesis like this:
$ pamtester login root "authenticate(PAM_SILENT)"
Flags are all named and combinable or inversible with bitwise
^ (XOR) and
The list of allowed options is shown below:
Additional authentication information such as the name of the
remote user, the remote host and the tty can be supplied via
--item) option. In the
following example, the tty name is given using "tty" command.
$ pamtester -I tty=`tty` login root open_session
The following types of information are supported:
If run with
--verbose) option, pamtester
generates quite detailed output that describes what is going
on behind the scene. Those arguments,
pamtester -v login root open_session close_session
will end up with something like below:
pamtester: invoking pam_start(login, root, ...)
pamtester: performing operation - open_session
Linux localhost 0.0.0 #1 Wed Dec 1 00:00:00 GMT 1971 i4004 GNU/Linux
pamtester: sucessfully opened a session
pamtester: performing operation - close_session
pamtester: session has successfully been closed.