# Switchs Cisco SG300/SG500 — récupération du mot de passe administrateur

- Link: https://dpioch.aristeecampus.org/realisations-en-entreprise/procedures-de-service-entreprise/switchs-cisco-sg300-sg500-recuperation-du-mot-de-passe-administrateur/
- Published: 2026-11-02T19:57:53+01:00
- Author: Admin

**En bref :** cette procédure permet de reprendre l’administration d’un switch Cisco
SG300/SG500 dont le mot de passe est perdu. Elle exige un accès physique (console
locale) : elle ne peut pas être réalisée à distance en Telnet ou en SSH. Le principe:
redémarrer l’équipement, passer par le menu de démarrage (option 3, « Password Recovery
Procedure »), qui réinitialise le mot de passe à vide, recharger la configuration
enregistrée avec `copy startup-config running-config` pour ne pas l’écraser, puis
définir un nouvel identifiant et enregistrer la configuration. L’équipement est 
indisponible pendant le redémarrage, et le mot de passe d’exemple (Password1) doit
être remplacé par un mot de passe respectant la complexité demandée (au moins trois
classes de caractères). Les étapes ci-dessous sont celles du constructeur, en anglais.

Recovering the Network Administrator Password

### Step 1

Access the CLI via a local console connection. For more information on how to access
the CLI in this manner, please refer to Access the CLI for 300 and 500 Switches 
via PuTTY Using a Console Connection. You must have access to the local console 
connection to recover the administrator password. You cannot recover the administrator
password remotely from a Telnet or Secure Shell (SSH) session to the management 
interface.

### Step 2

Power cycle the switch by unplugging the power cord and plugging it back in to the
back of the device. After a couple of seconds you should see the Cisco ASCII logo
with a prompt to escape the Autoboot loader. Press Return or Esc immediately to 
enter the Startup Menu. Power cycle with the console cable and Putty connected. 
If the device goes into Autoboot sequence, you can reattempt to enter the Startup
Menu by power cycling the device again.

The Startup Menu appears:

### Step 3

Press 3 to select option [3] Password Recovery Procedure . This will reset the password
to null.

### Step 4

Press Enter to go back to the Startup Menu, and then press Esc to exit. This will
start the Autoboot sequence. It is important to follow the sequence mentioned in
Steps 3 and 4.

### Step 5

After the switch has fully booted, you will be in password recovery mode. However,
before changing any usernames or passwords, enter the following commands to avoid
overwriting the existing configuration on the switch:

    ```
    Switch#
    ```

    ```
    enable
    ```

    ```
    Switch#
    ```

    ```
    copy startup-config running-config
    ```

In order to use backspace in the CLI, use the arrow keys to highlight the desired
character and then hit Backspace to delete the character. You can also hold down
Backspace to continuously delete characters to the right of the highlighted cursor.

### Step 6

In order to change the administrator password, you must enter configuration mode.
To enter configuration mode, enter one of the following commands based on your access
level:

    ```
    Switch#
    ```

    ```
    configuration terminal
    ```

### Step 7

Enter the following command to change the password of any given user:

    ```
    Switch(config)#
    ```

    ```
    username
    ```

<new or previous username> privilege 15 password <new password> Default password
complexity settings require that the password contain at least 3 character classes
such as a capital letter, a lowercase letter, and a number. The command in the screenshot
above sets the password for

    ```
    username1
    ```

to Password1 . If

    ```
    username1
    ```

does not exist as a user on the switch, a new user account is created.

### Step 8

Enter the following commands to exit configuration mode and write to the configuration
file.

    ```
    Switch(config)#
    ```

    ```
    exit
    ```

    ```
    Switch#
    ```

    ```
    write
    ```

### Step 9

Enter Y to overwrite the startup configuration file.

### Step 10

Enter the following command to reboot the system so that you can log in with your
newly configured username and password:

    ```
    Switch#
    ```

    ```
    reload
    ```

### Step 11

Enter Y to continue.  Your device will then reboot.

**Note :** procédure de service du support informatique que j’applique dans le cadre
de mes missions ; texte ci-dessous en anglais, issu de la documentation du constructeur(
Cisco), anonymisé pour la publication ; il ne s’agit pas d’une rédaction originale.
