我忘记了我的luci密码,但可以通过ssh进入。如何从控制台重置luci密码?我看到在/etc/config/luci中有这样的内容:
config extern 'flash_keep'
...
option passwd '/etc/passwd'
...
那么这是用常规的passwd命令完成的吗?
发布于 2014-08-04 22:28:09
您可以通过ssh使用passwd
命令更改超级用户密码。通常,root密码为luci密码。
\# passwd
Changing password for root
New password:
发布于 2018-08-18 04:26:55
实际上,您必须在使用passwd
之前发出mount_root
命令,然后重新启动。仅this answer中的方法对我不起作用(18.06.1)
root@(none):~# mount_root
switching to jffs2 overlay
root@(none):/rom/root# passwd
Changing password for root
New password:
Retype password:
passwd: password for root changed by root
root@(none):/rom/root# reboot -f
通过https://openwrt.org/docs/guide-user/troubleshooting/root_password_reset
发布于 2014-08-05 22:39:37
如果你想为luci使用非root用户,我在几个月前的一个项目中这样做了:
https://github.com/sudomesh/luci-app-peopleswifi/blob/master/luasrc/controller/peopleswifi/index.lua
其中"admin“是openwrt中的另一个用户。应该说,我的理解是openwrt在多用户环境中是特别不安全的。虽然理论上您不能为"admin“用户提供登录shell,但我不确定我是否会依赖此解决方案作为使用luci身份验证作为root的安全替代方案。
https://stackoverflow.com/questions/24728818
复制相似问题