Skip to main content

ResetPassword

Resets the password of a user

Examples​

Interactive: asks for the new password twice, without echoing it (when OCTO_CLI_NEW_PASSWORD is not set):

octo-cli -c ResetPassword -un "john.doe"

Automation: pipe the password in (e.g. from a secret store); -y because a piped standard input cannot confirm:

octo-cli -c ResetPassword `
-un "john.doe" `
-ps `
-y

Options​

ShortLongRequiredDescription
-un--userNameyesUser name
-p--passwordnoDeprecated: new password of the user. A value on the command line ends up in the shell history and the process list.
Omit it to be prompted (hidden input), or use --password-stdin or the environment variable OCTO_CLI_NEW_PASSWORD.
-ps--password-stdinnoRead the new password from standard input (one value; a trailing line break is removed)
-y--yesnoSkip confirmation prompt

Notes​

The new password is read from a hidden prompt, from standard input (--password-stdin) or from the environment variable OCTO_CLI_NEW_PASSWORD, so it does not end up in the shell history or the process list. -p/--password is deprecated: it still works in this release but logs a deprecation warning; the date of its removal will be announced.

Runs the CK method System.Identity/User.ResetPassword-1 through the asset repository (GraphQL); the new password is sent in the request body, never in a URL. Requires identity services 3.5.52 or newer with the password methods switched on (Methods:Identity:EnablePasswordMethods); against an older service the command stops with a message naming that version and does not fall back to the REST endpoint. Until the service is updated, the user can reset the password with 'Forgot password' on the sign-in page (needs e-mail delivery). Refusals (e.g. PASSWORD_POLICY_VIOLATION with the codes of the failed rules) are decided by the server and printed as code and message.