6.4. pam_echo - print text messages
Prev | Chapter 6. A reference guide for available modules | Next

## 6.4. pam_echo - print text messages

`pam_echo.so` [ file=`/path/message` ]

### 6.4.1. DESCRIPTION

The pam_echo PAM module is for printing text messages to inform user about special things. Sequences starting with the % character are interpreted in the following way:

%H

  The name of the remote host (PAM_RHOST).

%h

  The name of the local host.

%s

  The service name (PAM_SERVICE).

%t

  The name of the controlling terminal (PAM_TTY).

%U

  The remote user name (PAM_RUSER).

%u

  The local user name (PAM_USER).

All other sequences beginning with % expands to the characters following the % character.

### 6.4.2. OPTIONS

file=/path/message

  The content of the file `/path/message` will be printed with the PAM conversion function as PAM_TEXT_INFO.

### 6.4.3. MODULE TYPES PROVIDED

All module types (`auth`, `account`, `password` and `session`) are provided.

### 6.4.4. RETURN VALUES

PAM_BUF_ERR

  Memory buffer error.

PAM_SUCCESS

  Message was successful printed.

PAM_IGNORE

  PAM_SILENT flag was given or message file does not exist, no message printed.

### 6.4.5. EXAMPLES

For an example of the use of this module, we show how it may be used to print information about good passwords:

    password optional pam_echo.so file=/usr/share/doc/good-password.txt
    password required pam_unix.so

### 6.4.6. AUTHOR

Thorsten Kukuk <kukuk@thkukuk.de>

Prev | Up | Next
6.3. pam_deny - locking-out PAM module | Home | 6.5. pam_env - set/unset environment variables