switch-controller switch-profile
By default, each FortiSwitch has an admin account without a password. You can use the following command to replace the admin passwords for all FortiSwitches managed by a FortiGate.
config switch-controller switch-profile edit {name} # Configure FortiSwitch switch profile. set name {string} FortiSwitch Profile name. size[35] set login-passwd-override {enable | disable} Enable/disable overriding the admin administrator password for a managed FortiSwitch with the FortiGate admin administrator account password. set login-passwd {password_string} Login password of managed FortiSwitch. size[64] next end
Additional information
The following section is for those options that require additional explanation.
Removing a password override
If you had already applied a profile with the override enabled and the password set and then decide to remove the admin password, you need to apply a profile with the override enabled and no password set; otherwise, your previously set password will remain in the FortiSwitch. For example:
config switch-controller switch-profile
edit default
set login-passwd-override enable
unset login-passwd
end