May i know you specific device model ?
if the device is online on Cloud , you can modify the password on Cloud
If it is Reyee device and not online on Cloud , you need to reset the device to recove the web password
If it is Ruijie device and not online on Cloud , you can log in the device CLI interface and modify the web password by command
>enable
#config
(config )#webmaster username admin password xxxx (xxx is the password )
Welcome to Ruijie Community (https://community.ruijienetworks.com/)