Setpasswd command
From DD-WRT Wiki
(Difference between revisions)
Revision as of 02:19, 12 May 2020 (edit) Wrtf (Talk | contribs) m (fix dat link) ← Previous diff |
Current revision (02:20, 12 May 2020) (edit) (undo) Wrtf (Talk | contribs) m (category) |
||
Line 10: | Line 10: | ||
root:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/bin/sh | root:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/bin/sh | ||
reboot:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/sbin/reboot | reboot:$1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0:0:0:Root User,,,:/tmp/root:/sbin/reboot | ||
+ | |||
+ | [[Category:Command-line reference]] |
Current revision
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 $1$tmuJ6dMD$7dOhWGU3L8LzeMNyDmndg0 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