<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GSS",
  "identifier" : "/documentation/GSS/gss_aapl_change_password(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GSS"
    ],
    "preciseIdentifier" : "c:@F@gss_aapl_change_password"
  },
  "title" : "gss_aapl_change_password(_:_:_:_:)"
}
-->

# gss_aapl_change_password(_:_:_:_:)

Changes the password associated with a name.

```
func gss_aapl_change_password(_ name: gss_name_t, _ mech: gss_const_OID, _ attributes: CFDictionary, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> OM_uint32
```

## Parameters

`name`

The GSS name for which you want to change the password.

`mech`

The underlying mechanism in use. For example, use [`GSS_KRB5_MECHANISM`](/documentation/GSS/GSS_KRB5_MECHANISM) for Kerberos.

`attributes`

A dictionary that you use to specify the old and new passwords as string values. Use the keys [`kGSSChangePasswordOldPassword`](/documentation/GSS/kGSSChangePasswordOldPassword) and [`kGSSChangePasswordNewPassword`](/documentation/GSS/kGSSChangePasswordNewPassword) for the old and new passwords, respectively.

`error`

A `CFErrorRef` pointer that the function sets to point at a new error object if the function call fails. Pass `NULL` to ignore this error. When an error does exist, it describes the reason for the failure, and you are responsible for releasing it with `CFRelease`.

## Return Value

A major status code set to [`GSS_S_COMPLETE`](/documentation/GSS/GSS_S_COMPLETE) if the call succeeds, or some other value indicating the reason for failure if not.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)