Sub-commands
Once you have connected to the CLI, you can enter commands.
Each command line consists of a command word that is usually followed by words for the configuration data or other specific item that the command uses or affects:
get system admin
Sub-commands are available from within the scope of some commands. When you enter a sub-command level, the command prompt changes to indicate the name of the current command scope. For example, after entering:
config system admin
the command prompt becomes:
(admin)#
Applicable sub-commands are available to you until you exit the scope of the command, or until you descend an additional level into another sub-command.
For example, the edit sub-command is available only within a command that affects tables; the next sub-command is available only from within the edit sub-command:
config system interface
edit port1
set status up
next
end
|
|
Sub-command scope is indicated in this guide by indentation. See Indentation. |
Available sub-commands vary by command. From a command prompt within config, two types of sub-commands might become available:
-
commands affecting fields
-
commands affecting tables
Commands for tables
|
Remove a table from the current object. For example, in
|
|
|
Create or edit a table in the current object. For example, in
|
|
|
Save the changes to the current object and exit the |
|
|
List the configuration of the current object or table.
Tip: To get the default value (regardless of its current configuration), see View a setting's default value. |
|
|
Remove all tables in the current object. For example, in
Caution: Back up the FortiMail unit before performing a Caution: Do not purge |
|
|
Rename a table. For example, in
|
|
|
Display changes to the default configuration. Changes are listed in the form of configuration commands. |
Example of table commands
From within the system admin object, you might enter:
edit admin_1
The CLI acknowledges the new table, and changes the command prompt to show that you are now within the admin_1 table:
new entry 'admin_1' added
(admin_1)#
Commands for fields
|
Exit the |
|
|
Show, disable, or re-enable HA synchronization for each of the object or table's fields. By default, most settings are kept in sync amongst the devices in FortiMail HA clusters. During troubleshooting, you can temporarily disable sync of a field so that you can configure the secondary unit differently. To show fields with modified HA synchronization statuses (or optionally, for all fields): chattr [sync-display] To show only fields with disabled HA synchronization (modified or by default), on the primary unit, enter: chattr sync-disable To disable a field's HA synchronization, on the primary unit, enter: chattr sync-disable <field_name> end and then on the secondary unit, if you want to configure the setting differently, enter: diagnose system ha allow-secondary-cli config <object_name> set <field_name> ... To re-enable a field's HA synchronization, on the primary unit: chattr sync-unset <field_name> To globally show or unset all fields that have modified HA sync statuses, diagnose system ha show-sync-disable-cfg [all] diagnose system ha unset-sync-disable-cfg Note: |
|
|
Save the changes made to the current table or object fields, and exit the |
|
|
List the configuration of the current object or table.
|
|
|
Save the changes you have made in the current table’s fields, and exit the
|
|
|
Set a field’s value. For example, in Note: When using |
|
|
Display changes to the default configuration. Changes are listed in the form of configuration commands. |
|
|
Reset the table or object’s fields to default values. For example, in |
Example of field commands
From within the admin_1 table, you might enter:
set passwd my1stExamplePassword
to assign the value my1stExamplePassword to the passwd field. You might then enter the next command to save the changes and edit the next administrator’s table.