# phpman > man > PAM_MISC_SETENV(3)

[PAM_MISC_SETENV(3)](https://www.chedong.com/phpMan.php/man/PAMMISCSETENV/3/markdown)                        Linux-PAM Manual                        [PAM_MISC_SETENV(3)](https://www.chedong.com/phpMan.php/man/PAMMISCSETENV/3/markdown)



## NAME
       pam_misc_setenv - BSD like PAM environment variable setting

## SYNOPSIS
       **#include** **<security/pam**___**misc.h>**

       **int** **pam**___**misc**___**setenv(pam**___**handle**___**t** *****_pamh_**,** **const** **char** *****_name_**,** **const** **char** *****_value_**,** **int** _readonly_**);**

## DESCRIPTION
       This function performs a task equivalent to **pam**___**[putenv**(3)](https://www.chedong.com/phpMan.php/man/putenv/3/markdown), its syntax is, however, more like
       the BSD style function; **setenv()**. The _name_ and _value_ are concatenated with an '=' to form a
       name=value and passed to **pam**___**putenv()**. If, however, the PAM variable is already set, the
       replacement will only be applied if the last argument, _readonly_, is zero.

## SEE ALSO
       **pam**___**[putenv**(3)](https://www.chedong.com/phpMan.php/man/putenv/3/markdown), [**pam**(7)](https://www.chedong.com/phpMan.php/man/pam/7/markdown)

## STANDARDS
       The **pam**___**misc**___**setenv** function is part of the **libpam**___**misc** Library and not defined in any
       standard.



Linux-PAM Manual                             06/08/2020                           [PAM_MISC_SETENV(3)](https://www.chedong.com/phpMan.php/man/PAMMISCSETENV/3/markdown)
