---
title: "gss_aapl_change_password(_:_:_:_:)"
framework: GSS
role: symbol
role_heading: Function
platforms: [iOS 6.0+, iPadOS 6.0+, Mac Catalyst 13.1+, macOS 10.9+, visionOS 1.0+]
path: "gss/gss_aapl_change_password(_:_:_:_:)"
---

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

Changes the password associated with a name.

## Declaration

```swift
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 doc://com.apple.gss/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 doc://com.apple.gss/documentation/GSS/kGSSChangePasswordOldPassword and doc://com.apple.gss/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

Return Value A major status code set to GSS_S_COMPLETE if the call succeeds, or some other value indicating the reason for failure if not.

## See Also

### Inquiries

- [gss_display_name(_:_:_:_:)](gss/gss_display_name(_:_:_:_:).md)
- [gss_compare_name(_:_:_:_:)](gss/gss_compare_name(_:_:_:_:).md)
- [gss_inquire_name(_:_:_:_:_:)](gss/gss_inquire_name(_:_:_:_:_:).md)
- [gss_inquire_mechs_for_name(_:_:_:)](gss/gss_inquire_mechs_for_name(_:_:_:).md)
- [gss_inquire_names_for_mech(_:_:_:)](gss/gss_inquire_names_for_mech(_:_:_:).md)
- [gss_duplicate_name(_:_:_:)](gss/gss_duplicate_name(_:_:_:).md)
- [gss_userok(_:_:)](gss/gss_userok(_:_:).md)
