---
name: "pam_prompt"
section: "3"
platform: "linux"
package: "pam"
version: "1.7.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/pam_prompt"
---

# pam\_prompt(3)

interface to conversation function

## NAME

pam\_prompt, pam\_vprompt - interface to conversation function

## SYNOPSIS

```
#include <security/pam_ext.h>
```

**int pam\_prompt(pam\_handle\_t \****pamh***, int** *style***, char \*\****response***, const char \****fmt***,** *...***);**

**int pam\_vprompt(pam\_handle\_t \****pamh***, int** *style***, char \*\****response***, const char \****fmt***, va\_list** *args***);**

## DESCRIPTION

The **pam\_prompt** function constructs a message from the specified format string and arguments and passes it to the conversation function as set by the service. Upon successful return, *response* is set to point to a string returned from the conversation function. This string is allocated on heap and should be freed.

## RETURN VALUES

PAM\_BUF\_ERR

Memory buffer error.

PAM\_CONV\_ERR

Conversation failure.

PAM\_SUCCESS

Conversation succeeded, response is set.

PAM\_SYSTEM\_ERR

System error.

## SEE ALSO

[**pam**(8)](/pam/8.md), [**pam\_conv**(3)](/pam_conv/3.md)

## STANDARDS

The **pam\_prompt** and **pam\_vprompt** functions are Linux-PAM extensions.
