Try the following (quote from other D-link switch manuals)
Dlink dgs 3024 reset password:
- For security reasons, the Password Recovery feature requires the user to physically access the device.Therefore this feature is only applicable when there is a direct connection to the console port of the device. It is necessary for the user needs to attach a terminal or PC with terminal emulation to the console port of the switch.
- Power on the switch. After the boot image is loaded to 100%, the Switch will allow 2 seconds for the user to press the hotkey (Shift + 6,except for AZERTY keyboard it’s Alt Gr+9 ) to enter the “Password Recovery Mode”. Once the Switch enters the “Password Recovery Mode”, all ports on the Switch will be disabled.
- In the “Password Recovery Mode” only the following commands can be used.
- reset config
- reset account
- reset password
- show account
The reset config command resets the whole configuration back to the default values, with the exception of the account settings. The reboot command exits the Password Recovery Mode and restarts the switch. The reset account command deletes all of the created user accounts. The reset password command resets the password of the specified user. If a username is not specified, the password of all the users will be reset. The show account command displays all previously created accounts.
if this doesn’t work, contact D-Link. They know how to generate a password based on the MAC — this you can learn from the notes on firmware 3.01.030: