1.修改/etc/passwd文件
root@ZhouWu:/etc# cat passwd
root:x:0:0:root:/root:/bin/ash
admin:x:0:0:root:/root:/bin/ash
daemon:*:1:1:daemon:/var:/bin/false
2.修改/etc/shadow文件
root@ZhouWu:/etc# cat shadow
root:$1$GugEHiem$ZZ4CaPfJ5UkGq0Kpc.2vf/:19607:0:99999:7:::
admin:$1$GugEHiem$ZZ4CaPfJ5UkGq0Kpc.2vf/:19607:0:99999:7:::
daemon:*:0:0:99999:7:::
3.修改/etc/config/rpcd
config rpcd
option socket /var/run/ubus/ubus.sock
option timeout 30
config login
option username 'admin'
option password '$p$admin'
list read '*'
list write '*'
4.修改/usr/share/ucode/luci/template/themes/bootstrap/sysauth.ut文件
#
Copyright 2022 Jo-Philipp Wich <jo@mein.io>
Licensed to the public under the Apache License 2.0.
-#}
{% include('header', { blank_page: true }) %}
<section hidden>
<form method="post" class="cbi-map">
<div class="cbi-section">
<div class="cbi-section-node">
<div class="cbi-value">
<label class="cbi-value-title" for="luci_username">{{ _('Username') }}</label>
<div class="cbi-value-field">
<input name="luci_username" id="luci_username" type="text" autocomplete="username" value="admin">
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title" for="luci_password">{{ _('Password') }}</label>
<div class="cbi-value-field">
<input name="luci_password" id="luci_password" type="password" autocomplete="current-password">
</div>
</div>
</div>
</div>
</form>
5.测试如下: