Skip to content

Accept an account's pending uid or gid (admin only)

POST
/api/admin/nss/users/{uid}/accept-id-change
curl --request POST \
--url https://example.com/api/admin/nss/users/1/accept-id-change \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'

Applies the pending uid and gid of the NSS account stored with this uid, in one transaction that re-keys its group memberships to the new uid, and audits it as nss.id_change_accepted. Hosts see the new number from then on, so re-own the account’s files on them first. Refused with 409 when another account, a tombstone included, holds the new uid.

uid
required
integer

The account’s stored uid

The account after the change

Media typeapplication/json
object
data
required
object
dn
required
string
gid

GID is absent when the entry has no gid attribute.

integer
name
required
string
uid
required
integer
error
string

Example generated

{
"data": {
"dn": "example",
"gid": 1,
"name": "example",
"uid": 1
},
"error": "example"
}

The uid is not a number

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authenticated

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Not authorized as admin

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

No account with that uid has a pending change, or NSS is disabled

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Another account holds the new uid

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}