---
name: "pam_start"
section: "3"
platform: "macos"
package: "OpenPAM"
version: "35"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/pam_start"
---

# pam\_start(3)

initiate a PAM transaction

## NAME

**pam\_start** – initiate a PAM transaction

## LIBRARY

library “libpam”

## SYNOPSIS

**#include \<sys/types.h\>**

**#include \<security/pam\_appl.h\>**

*int*\

**pam\_start**(*const char \*service*, *const char \*user*, *const struct pam\_conv \*pam\_conv*, *pam\_handle\_t \*\*pamh*);

## DESCRIPTION

The **pam\_start** function creates and initializes a PAM context.

The *service* argument specifies the name of the policy to apply, and is stored in the PAM\_SERVICE item in the created context.

The *user* argument specifies the name of the target user - the user the created context will serve to authenticate. It is stored in the PAM\_USER item in the created context.

The *pam\_conv* argument points to a *struct* *pam\_conv* describing the conversation function to use; see *pam\_conv* for details.

## RETURN VALUES

The **pam\_start** function returns one of the following values:

- \[PAM\_BUF\_ERR\]

  Memory buffer error.

- \[PAM\_SYSTEM\_ERR\]

  System error.

## SEE ALSO

[pam(3)](/pam/3.md), [pam\_end(3)](/pam_end/3.md), [pam\_get\_item(3)](/pam_get_item/3.md), [pam\_set\_item(3)](/pam_set_item/3.md), [pam\_strerror(3)](/pam_strerror/3.md)

## STANDARDS

*X/Open Single Sign-On Service (XSSO) - Pluggable Authentication Modules*, June 1997.

## AUTHORS

The **pam\_start** function and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 (“CBOSS”), as part of the DARPA CHATS research program.
