Skip to main content
pginete
Staff
Staff
December 14, 2021

Technical Tip: How to change the admin password on the FortiGate for the managed FortiSwitch

  • December 14, 2021
  • 0 replies
  • 30891 views
Description

This article describes how to change the admin password on the FortiGate for the managed FortiSwitch units.

Scope

FortiGate, FortiSwitch.

Solution

By default, each FortiSwitch has an admin account without a password. To replace the admin passwords for all FortiSwitch units managed by a FortiGate, use the following commands from the FortiGate CLI:

 

config switch-controller switch-profile

    edit default

        set login-passwd-override enable

        set login-passwd <password>

    next

end

 

If there was already a profile applied with the override enabled and the password set and if it is necessary to remove the admin password, apply a profile with the override enabled and no password set; otherwise, the 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

    next

end

 

If it is necessary to change the password for only one switch, avoid using the default profile: by default, it applies to all of the switches in the configuration. Verify which profile is applied to which switch by using the following commands:

 

config switch-controller managed-switch

    edit "S248EFTFxxxxxxxx"

        get | grep profile

 

Configure a switch profile and apply it for that one switch as follows:

 

config switch-controller switch-profile

    edit "New-profile"

        set login-passwd-override enable

        set login-passwd <password>

    next

end

 

config switch-controller managed-switch

    edit "S248EFTFxxxxxxxx"

        set switch-profile "New-profile"

    next

end

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!