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

# pam\_set\_item(3)

set authentication information

## NAME

**pam\_set\_item** – set authentication information

## LIBRARY

library “libpam”

## SYNOPSIS

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

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

*int*\

**pam\_set\_item**(*pam\_handle\_t \*pamh*, *int item\_type*, *const void \*item*);

## DESCRIPTION

The **pam\_set\_item** function sets the item specified by the *item\_type* argument to a copy of the object pointed to by the *item* argument. The item is stored in the PAM context specified by the *pamh* argument. See [pam\_get\_item(3)](/pam_get_item/3.md) for a list of recognized item types.

## RETURN VALUES

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

- \[PAM\_BUF\_ERR\]

  Memory buffer error.

- \[PAM\_SYMBOL\_ERR\]

  Invalid symbol.

- \[PAM\_SYSTEM\_ERR\]

  System error.

## SEE ALSO

[pam(3)](/pam/3.md), [pam\_get\_item(3)](/pam_get_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\_set\_item** 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.
