Explorar el Código

07env-install-centos.sh

lizw hace 1 año
padre
commit
0c1ece228e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      00base/07env-install-centos.sh

+ 2 - 0
00base/07env-install-centos.sh

@@ -273,6 +273,8 @@ function init:add_user() {
     adduser ${ADD_USER_NAME}
     # 设置密码
     echo ${ADD_USER_NAME}:${ADD_USER_PASSWORD} | chpasswd
+    # 禁止远程登录
+    echo DenyUsers ${ADD_USER_NAME} >> /etc/ssh/sshd_config
   fi
   if [ \`grep -c '$add_sudoers' '/etc/sudoers'\` == '0' ];then
     # 新增修改权限