From 4b1599eb377b1c3b9bbd5946db41b7d48d411147 Mon Sep 17 00:00:00 2001 From: zhao Date: Sun, 19 Jan 2025 00:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20hanwckf=5Fmt798x.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- hanwckf_mt798x.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hanwckf_mt798x.sh b/hanwckf_mt798x.sh index 7e34688..79cbe3a 100644 --- a/hanwckf_mt798x.sh +++ b/hanwckf_mt798x.sh @@ -22,6 +22,10 @@ echo -e "\nsrc-git extraipk https://github.com/xiangfeidexiaohuo/extra-ipk" >> f echo -e "${YELLOW}修改默认IP${NC}" sed -i 's/192.168.1.1/10.0.0.1/g' package/base-files/files/bin/config_generate +# 设置默认密码 +sed -i 's/root::0:0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow +sed -i 's/root:::0:99999:7:::/root:$1$V4UetPzk$CYXluq4wUazHjmCDBCqXF.:0:0:99999:7:::/g' /etc/shadow + # profile echo -e "${YELLOW}profile${NC}" sed -i 's#\\u@\\h:\\w\\\$#\\[\\e[32;1m\\][\\u@\\h\\[\\e[0m\\] \\[\\033[01;34m\\]\\W\\[\\033[00m\\]\\[\\e[32;1m\\]]\\[\\e[0m\\]\\\$#g' package/base-files/files/etc/profile @@ -196,7 +200,7 @@ git clone --depth=1 https://github.com/sirpdboy/luci-app-netwizard package/luci- # 修改名称 echo -e "${YELLOW}修改名称${NC}" -sed -i 's/OpenWrt/ZeroWrt/' package/base-files/files/bin/config_generate +sed -i "s/hostname='.*'/hostname='ZeroWrt'/g" package/base-files/files/bin/config_generate # Theme echo -e "${YELLOW}Theme${NC}"