diff --git a/Check_script/.DS_Store b/Check_script/.DS_Store deleted file mode 100644 index 02de033..0000000 Binary files a/Check_script/.DS_Store and /dev/null differ diff --git a/Check_script/bash/CentOS_Check_Script.sh b/Check_script/bash/CentOS_Check_Script.sh index beb2ca4..f8935da 100644 --- a/Check_script/bash/CentOS_Check_Script.sh +++ b/Check_script/bash/CentOS_Check_Script.sh @@ -5,7 +5,7 @@ echo "##########################################################################" echo "# #" -echo "# Epoint health check script #" +echo "# health check script #" echo "# #" echo "#警告:本脚本只是一个检查的操作,未对服务器做任何修改,管理员可以根据此报告 #" echo "#进行相应的安全整改 #" diff --git a/Protective_Script/CentOS_Protective_Script.sh b/Protective_Script/CentOS_Protective_Script.sh index 2826ff0..4fae880 100644 --- a/Protective_Script/CentOS_Protective_Script.sh +++ b/Protective_Script/CentOS_Protective_Script.sh @@ -128,23 +128,23 @@ fi ################################新增超级管理员用户################################ function create_user(){ echo "#########################################################################################" - echo -e "\033[1;31m 3、Create eproot account \033[0m" + echo -e "\033[1;31m 3、Create openroot account \033[0m" echo "#########################################################################################" - read -p "Be sure to create an eproot account?[y/n]:" + read -p "Be sure to create an openroot account?[y/n]:" case $REPLY in y) - grep -i 'eproot' /etc/passwd + grep -i 'openroot' /etc/passwd if [ $? == 0 ];then - echo -e "\033[1;31m An eproot account has been created \033[0m" + echo -e "\033[1;31m An openroot account has been created \033[0m" else read -p "Please enter your password:" PASSWD - useradd -g root eproot;echo "$PASSWD" | passwd --stdin eproot > /dev/null + useradd -g root openroot;echo "$PASSWD" | passwd --stdin openroot > /dev/null if [ $? == 0 ];then - echo -e "\033[1;31m eproot account created successfully \033[0m" - grep -i "eproot" /etc/sudoers + echo -e "\033[1;31m openroot account created successfully \033[0m" + grep -i "openroot" /etc/sudoers if [ $? != 0 ];then chmod u+w /etc/sudoers > /dev/null - sed -i '/^root.*ALL=(ALL).*$/a\eproot ALL=(ALL) NOPASSWD:ALL' /etc/sudoers > /dev/null + sed -i '/^root.*ALL=(ALL).*$/a\openroot ALL=(ALL) NOPASSWD:ALL' /etc/sudoers > /dev/null if [ $? == 0 ];then echo -e "\033[37;5m [Permissions set success] \033[0m" else @@ -155,7 +155,7 @@ function create_user(){ echo -e "\033[1;31m Permissions have already been set \033[0m" fi else - echo -e "\033[1;31m eproot account created failed \033[0m" + echo -e "\033[1;31m openroot account created failed \033[0m" exit 1 fi fi @@ -354,7 +354,7 @@ function main(){ # Menu # # 1:ALL protective # # 2:Set Password Complexity Requirements # -# 3:Create eproot account # +# 3:Create openroot account # # 4:Set Remote Login Configuration(SSH) # # 5:Set Shell History and TMOUT # # 6:Set SSH Port # diff --git a/Protective_Script/README.txt b/Protective_Script/README.txt index ff5eec5..28b1193 100644 --- a/Protective_Script/README.txt +++ b/Protective_Script/README.txt @@ -14,7 +14,7 @@ 功能说明: 1、ALL protective 一键进行全部加固 2、Set Password Complexity Requirements 设置密码复杂度 -3、Create eproot account 添加eproot账号 +3、Create openroot account 添加openroot账号 4、Set Remote Login Configuration(SSH) 禁止root远程登入 5、Set Shell History and TMOUT 设置history保存行数以及命令时间,设置窗口超时时间 6、Set SSH Port 更改SSH端口 @@ -40,7 +40,7 @@ Date: 2019-03-08 ------------------------ Date: 2019-03-18 -添加新增eproot账号功能,防止系统没有除root账号外的其余账号,配置了禁止root远程,导致系统无法登入 +添加新增openroot账号功能,防止系统没有除root账号外的其余账号,配置了禁止root远程,导致系统无法登入 ---------------------- diff --git a/README.md b/README.md index f074a73..6d0ada0 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ sudo sh CentOS_Protective_Script.sh **功能说明** - 一键进行全部加固 - 设置密码复杂度 -- 添加eproot账号 +- 添加openroot账号 - 禁止root远程登入 - 设置history保存行数以及命令时间,设置窗口超时时间 - 更改SSH端口