From cf2707851c84771a64b6448eb345834b454a1a28 Mon Sep 17 00:00:00 2001 From: lizw <1183409807@qq.com> Date: Sun, 30 Oct 2022 16:53:24 +0800 Subject: [PATCH] 07env-install-centos.sh --- 00base/07env-install-centos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/00base/07env-install-centos.sh b/00base/07env-install-centos.sh index 4147bf3..a3e1874 100644 --- a/00base/07env-install-centos.sh +++ b/00base/07env-install-centos.sh @@ -236,7 +236,7 @@ function init:add_user() { # 设置密码 echo ${ADD_USER_NAME}:${ADD_USER_PASSWORD} | chpasswd fi - if [ \`grep -c $add_sudoers /etc/sudoers\` -ne '0' ];then + if [ \`grep -c '$add_sudoers' '/etc/sudoers'\` -ne '0' ];then # 新增修改权限 chmod -v u+w /etc/sudoers echo -e \"\n$add_sudoers\n\" >> /etc/sudoers