stack es security put-user cli command
Auth required
Idempotent
Scope: global
elastic stack es security put-user --username <username> [options]
Create or update users.
Behaviour flags:
--dry-run — validate all inputs and exit without performing any action
--usernamestringrequired- An identifier for the user. NOTE: Usernames must be at least 1 and no more than 507 characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic Latin (ASCII) block. Leading or trailing whitespace is not allowed.
--refreshstring- Valid values are
true,false, andwait_for. These values have the same meaning as in the index API, but the default value for this API is true. --emailstring- The email of the user.
--full-namestring- The full name of the user.
--metadatastring- Arbitrary metadata that you want to associate with the user.
--passwordstring- The user's password. Passwords must be at least 6 characters long. When adding a user, one of
passwordorpassword_hashis required. When updating an existing user, the password is optional, so that other fields on the user (such as their roles) may be updated without modifying the user's password --password-hashstring- A hash of the user's password. This must be produced using the same hashing algorithm as has been configured for password storage. For more details, see the explanation of the
xpack.security.authc.password_hashing.algorithmsetting in the user cache and password hash algorithm documentation. Using this parameter allows the client to pre-hash the password for performance and/or confidentiality reasons. Thepasswordparameter and thepassword_hashparameter cannot be used in the same request. --rolesstring[]- A set of roles the user has. The roles determine the user's access permissions. To create a user without any roles, specify an empty list (
[]). --[no-]enabled- Specifies whether the user is enabled.
--input-filestring- path to a JSON file to use as command input
--[no-]dry-run- validate all inputs and exit without performing any action (preview changes without applying them)
--[no-]json-
output as JSON