![]() |
The gui-user console command allows the user to modify GUI user settings from the command line. The general structure of the command is:
gui-user action options
The action must be one of the following:
-a or --add: Add user mode, used for configuring a new user.
When using the –a option, the following options are also required:
-n or --name
-p or --password
-r or --role
-e or --edit=username: Edit user mode, used for changing parameter fields for an existing user. This option also allows you to change the username.
![]() | Note |
|
username is required and must be the username of an existing user. |
-d or --delete=username: Delete user mode, used for deleting a user.
![]() | Note |
|
The username is required and must be the username of an existing user. Any specified options, except debug and quiet, will be ignored. |
--version: Displays the command version, which is equal to the GUI version.
--help: Displays detailed information about the command, possible arguments, and a few examples.
Can be any combination of the following:
n or --name: Specifies the username to set. This option is required when using –a (add) option.
-p or --password: Specifies the password to set. This option is required when adding a user with the –a (add) option, editing using the –e (edit) option, or specifying the -n (name) or –t (type) flags.
-c or --contact-info: Specifies the contact info to set.
-N or --real-name: Specifies the real name to set.
-r or --role: Specifies the user role to set. Can be admin, manager, or supervisor. Required when using –a (add) option.
-t or --type: Specifies the user type to set. Can be legacy, local, ASG, or radius. These user types are relevant for the add and edit operations. For more information, see New administrative account field descriptions.
-s or --status: Specifies the user status to set. Can be ok or disabled.
--debug: Outputs debug logs to stdout when executing the command.
--quiet: Suppresses all output. If both the quiet option and debug option are specified, the quiet option takes precedence.
When the command is run, an exit code is returned. Any relevant details for a failure are passed to stderr. A list of possible returned exit codes:
-1 – User has no permission to run this command (this command must be run as the root user).
0 – Completed successfully.
1 – Invalid command syntax. This exit code is returned if no action is specified or one of the required options was missing.
2 – Validation failed. One or more of the options did not pass validation.
3 – User does not exist. This usually happens when trying to edit or delete a user that does not exist.
4 – User exists. This usually happens when trying to add a user or changing a username to one that already exists.
5 – User is required. This usually happens if a username was not specified when trying to edit or delete a user.
6 – Role is required. This usually happens if a role is not specified when adding a new user.
7 – Action failed. This usually happens if the connection to the database could not be established or some other library failed.
1000 – An unknown error has occurred.
| Command | Usage | ||||
|---|---|---|---|---|---|
| gui-user --edit test-user --status disabled | Edits an existing user named test-user and disables the user. This command exits with code 0. | ||||
| gui-user –e test-user –u fred | Edits an existing user named test-user and changes the username to fred using the shorthand options. This command exits with code 0. | ||||
| gui-user –d test-user |
Deletes a user named test-user using shorthand options.
|
||||
| gui-user –e test-user –p password | Changes the password. |