Reset DD-WRT http password using SSH

So the other day I was making my usual password changing rounds on my accounts and devices. One of the things that I do change regularly is my password for DD-WRT. Somehow I changed it and could no longer access the device.

Alas, I did have SSH enabled and it let me log in using the original password that I had setup. I searched all over the place for documentation on doing this, and found nothing but people asking how to reset the actual router due to a lost password, and I wasn’t in the mood to rebuild my config. So here is the steps that I took.

1. Login to the router via ssh.
2. Type in nvram set http_passwd=
3. Then type in nvram commit

Finally, open your web browser and connect to your router. Change your password on the administration page and you are good to go.

the exploit has been fixed a long time ago. your version is out of date.
beside this. isnt it easier to use the command
“setuserpasswd” instead of modifying the nvram.
the command does allow resetting of the username and password to a new one

I haven’t read all the comments yet, but one thing that should be mentioned is that the password is encrypted. So if you type nvram set http_passwd=Password123 … this will not work. I haven’t tried yet, but I imagine that you need to type http_passwd=MD5(“Password123″) or something like this. *I’m actually not sure what the encryption is.

if you type nvram show | grep http_passwd you will see that it’s encrypted.
if you have to reset everything to default type erase nvram && reboot

can you help me how to set password on my router(cd-r king WRT-688)
the 192.168.1.1 dd-wrt set-up being prompted when i tried to set-up it requires a username and password are being requested by http://192.168.1.1. The site says: “DD-WRT”