From 5d2d7f6867a029f38fb8a9c5ba91b560a1b9424d Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Thu, 27 Jun 2019 23:28:59 +0800 Subject: [PATCH 1/8] add star --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ccad5cd..5148851 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,8 @@ sudo sh CentOS_Protective_Script.sh - 更改SSH端口 - 登入失败处理 - 还原配置文件 + + +############## + +如果对你有帮助,请来一波star From 736eec4571e6553f9e3d2acd476c47fca1f2cf4b Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Thu, 27 Jun 2019 23:33:40 +0800 Subject: [PATCH 2/8] add gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store From b2a1f830f5970ad3f308503601aad7f0808e0be9 Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Thu, 27 Jun 2019 23:34:37 +0800 Subject: [PATCH 3/8] add star --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5148851..f420d3d 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,6 @@ sudo sh CentOS_Protective_Script.sh - 还原配置文件 -############## - +```bash 如果对你有帮助,请来一波star +``` From 817703b6ed26e6809d7f5e33bd7cdc57affa3450 Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Thu, 27 Jun 2019 23:35:57 +0800 Subject: [PATCH 4/8] add star --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index f420d3d..f039753 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,4 @@ sudo sh CentOS_Protective_Script.sh - 还原配置文件 -```bash -如果对你有帮助,请来一波star -``` +### 如果对你有帮助,请来一波star From 65d3a49d073639b3ce68850604e68792de74be9b Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Wed, 17 Jul 2019 17:07:10 +0800 Subject: [PATCH 5/8] modify the readme --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f039753..f074a73 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Linux 系统检测和加固脚本 +# Linux 系统检测和加固脚本 (如果对你有帮助,请来一波star) **主要是为了Linux系统的安全,通过脚本对Linux系统进行一键检测和一键加固** @@ -62,4 +62,3 @@ sudo sh CentOS_Protective_Script.sh - 还原配置文件 -### 如果对你有帮助,请来一波star From 5695460055a29d0bab2f781b0c5c1050dc5aa0b7 Mon Sep 17 00:00:00 2001 From: suleo <1072089839@qq.com> Date: Thu, 2 Apr 2020 21:09:39 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9CentOS=5FCheck=5FScript.s?= =?UTF-8?q?h=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 7 ++++++- Check_script/bash/CentOS_Check_Script.sh | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e43b0f9..b99e3ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ -.DS_Store +.idea +/tools/.idea/ +/PYJSAC/.idea/ +/unit_test +*~ +*.DS_Store diff --git a/Check_script/bash/CentOS_Check_Script.sh b/Check_script/bash/CentOS_Check_Script.sh index 9bba76e..beb2ca4 100644 --- a/Check_script/bash/CentOS_Check_Script.sh +++ b/Check_script/bash/CentOS_Check_Script.sh @@ -222,7 +222,7 @@ echo "用户错误登入列表:" lastb | head > /dev/null if [ $? == 1 ];then echo ">>>无用户错误登入列表" -then +else echo ">>>用户错误登入--------[需调整]" lastb | head fi From b979b1318947f1af0eb16aa0b4edac04c02c0ad9 Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Thu, 6 May 2021 16:48:52 +0800 Subject: [PATCH 7/8] Change the new openroot account --- Protective_Script/CentOS_Protective_Script.sh | 20 +++++++++---------- Protective_Script/README.txt | 4 ++-- README.md | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) 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端口 From a9eba328a24703f1cd0771350709a1c938291a6e Mon Sep 17 00:00:00 2001 From: "jack.xiao" Date: Mon, 8 Aug 2022 09:19:36 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Check_script/.DS_Store | Bin 6148 -> 0 bytes Check_script/bash/CentOS_Check_Script.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 Check_script/.DS_Store diff --git a/Check_script/.DS_Store b/Check_script/.DS_Store deleted file mode 100644 index 02de033f9c97028ec0a7b014f00b3b9f08b8cb11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKJ5Iwu5SKp9X5mJG=E!9WGGfSpJ8>A>Pf0AK>M6YOP{kQ@^*3)p#t2f{uT=u

z JC