Skip to content

set-mfa-methods ​

Available in4.21.0 +

Enables or disables multi-factor authentication (MFA) methods for the instance. A method that is not specified keeps its current state.

Syntax:

shell
sfiler-admin [options] set-mfa-methods [command options]
Command optionsRequired/OptionalDescription
-totpOptionalTrue or False: Enable or disable the authenticator application (TOTP) method.
-emailOptionalTrue or False: Enable or disable the method that sends a one-time code by email.
-smsOptionalTrue or False: Enable or disable the method that sends a one-time code by SMS. It can only be enabled if an SMS provider is configured.

At least one of -totp, -email or -sms is required. The command must be run by an administrator.

On a new installation, only the TOTP method is enabled. When MFA is enforced for regular users, guests or administrators, at least one usable method must remain enabled: the SMS method only counts if an SMS provider is configured.

To display the current state of the methods, use the list-mfa-methods command.

Example:

shell
sfiler-admin.sh -l my-admin -p 012345 -s https://www.example.com/sfiler/server/ set-mfa-methods -email True -sms False
shell
sfiler-admin.exe -l my-admin -p 012345 -s https://www.example.com/sfiler/server/ set-mfa-methods -email True -sms False