默认登录名root存在较大安全风险,基于此修改root为其他用户名。修改后,设置均衡负载、定时重启等多个插件均出现保存设置无响应的问题。期待修复。
修改了以下位置——
1.修改/etc/passwd
将root❌0:0:root:/root:/bin/ash修改为username❌0:0:root:/root:/bin/ash
2.修改/etc/shadow
将root:xxxxxx:0:0:99999:7:::修改为username:xxxxxx:0:0:99999:7:::
3.修改/etc/config/rpcd
将option username 'root' 改成 option username 'username'
将option password '$p$root' 改成 option password '$p$username'
4.修改/usr/lib/lua/luci/controller/admin/index.lua
将e.sysauth = “root” 修改为e.sysauth = “username”
不支持的,必须用 root
root 用户不能改
Most helpful comment
不支持的,必须用 root