---
name: "auth_passwd"
section: "3"
platform: "linux"
package: "courier-authlib-dev"
version: "0.72.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/auth_passwd"
---

# auth\_passwd(3)

Change account's password

## NAME

auth\_passwd - Change account's password

## SYNOPSIS

```
#include <courierauth.h>
```

**int rc=auth\_passwd(const char \****service***, const char \****username***, const char \****oldpassword***, const char \****newpassword***);**

## DESCRIPTION

If *username*'s password is *oldpassword*, it is replaced with *newpassword*. *service* identifies which so-called "service"'s password is changed; like “imap” or “pop3”. Some Courier authentication library's back-end module can use different passwords for different services. *service* is ignored if this is not the case.

## RETURNS

**auth\_passwd** returns 0 if the password was succesfully changed. A non-0 error code indicates a failure..

## SEE ALSO

[**authlib**(3)](/authlib/3.md)\[1\], [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)\[2\], [**auth\_login\_meta**(3)](/auth_login_meta/3.md)\[3\], [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)\[4\], [**auth\_enumerate**(3)](/auth_enumerate/3.md)\[5\].

## NOTES

- 1\.

  [**authlib**(3)](/authlib/3.md)

  http://www.courier-mta.org/authlib/authlib.html

- 2\.

  [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_generic.html

- 3\.

  [**auth\_login\_meta**(3)](/auth_login_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_login.html

- 4\.

  [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_getuserinfo.html

- 5\.

  [**auth\_enumerate**(3)](/auth_enumerate/3.md)

  http://www.courier-mta.org/authlib/auth\_enumerate.html
