Setpasswd command

From DD-WRT Wiki

Jump to: navigation, search

The setpasswd command recreates the /etc/passwd file so that the password to log into SSH/Telnet will match the password for the Web administration GUI.

usage: setpasswd (no arguments)

Usually this occurs automatically when the password is changed using the GUI or the setuserpasswd command, so setpasswd is not needed. You can check by comparing the hashed password in the NVRAM setting to the /etc/passwd file:

root@DD-WRT:~# nvram get http_passwd 
root@DD-WRT:~# cat /etc/passwd
root:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/bin/sh
reboot:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/sbin/reboot