Resetting the web-gui dd-wrt password with telnet

Problem

You have forgotten your web-gui credentials to login into your dd-wrt router but you have still telnet access to it.

Solution

Login with telnet to your router and then run the following two commands to reset the web interface:

nvram set http_passwd=
nvram commit

and then go to your Web interface to set a new one.

* Based on this post