Skip to content

Commit b979b13

Browse files
committed
Change the new openroot account
1 parent 204afb3 commit b979b13

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Protective_Script/CentOS_Protective_Script.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,23 +128,23 @@ fi
128128
################################新增超级管理员用户################################
129129
function create_user(){
130130
echo "#########################################################################################"
131-
echo -e "\033[1;31m 3、Create eproot account \033[0m"
131+
echo -e "\033[1;31m 3、Create openroot account \033[0m"
132132
echo "#########################################################################################"
133-
read -p "Be sure to create an eproot account?[y/n]:"
133+
read -p "Be sure to create an openroot account?[y/n]:"
134134
case $REPLY in
135135
y)
136-
grep -i 'eproot' /etc/passwd
136+
grep -i 'openroot' /etc/passwd
137137
if [ $? == 0 ];then
138-
echo -e "\033[1;31m An eproot account has been created \033[0m"
138+
echo -e "\033[1;31m An openroot account has been created \033[0m"
139139
else
140140
read -p "Please enter your password:" PASSWD
141-
useradd -g root eproot;echo "$PASSWD" | passwd --stdin eproot > /dev/null
141+
useradd -g root openroot;echo "$PASSWD" | passwd --stdin openroot > /dev/null
142142
if [ $? == 0 ];then
143-
echo -e "\033[1;31m eproot account created successfully \033[0m"
144-
grep -i "eproot" /etc/sudoers
143+
echo -e "\033[1;31m openroot account created successfully \033[0m"
144+
grep -i "openroot" /etc/sudoers
145145
if [ $? != 0 ];then
146146
chmod u+w /etc/sudoers > /dev/null
147-
sed -i '/^root.*ALL=(ALL).*$/a\eproot ALL=(ALL) NOPASSWD:ALL' /etc/sudoers > /dev/null
147+
sed -i '/^root.*ALL=(ALL).*$/a\openroot ALL=(ALL) NOPASSWD:ALL' /etc/sudoers > /dev/null
148148
if [ $? == 0 ];then
149149
echo -e "\033[37;5m [Permissions set success] \033[0m"
150150
else
@@ -155,7 +155,7 @@ function create_user(){
155155
echo -e "\033[1;31m Permissions have already been set \033[0m"
156156
fi
157157
else
158-
echo -e "\033[1;31m eproot account created failed \033[0m"
158+
echo -e "\033[1;31m openroot account created failed \033[0m"
159159
exit 1
160160
fi
161161
fi
@@ -354,7 +354,7 @@ function main(){
354354
# Menu #
355355
# 1:ALL protective #
356356
# 2:Set Password Complexity Requirements #
357-
# 3:Create eproot account #
357+
# 3:Create openroot account #
358358
# 4:Set Remote Login Configuration(SSH) #
359359
# 5:Set Shell History and TMOUT #
360360
# 6:Set SSH Port #

Protective_Script/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
功能说明:
1515
1、ALL protective 一键进行全部加固
1616
2、Set Password Complexity Requirements 设置密码复杂度
17-
3、Create eproot account 添加eproot账号
17+
3、Create openroot account 添加openroot账号
1818
4、Set Remote Login Configuration(SSH) 禁止root远程登入
1919
5、Set Shell History and TMOUT 设置history保存行数以及命令时间,设置窗口超时时间
2020
6、Set SSH Port 更改SSH端口
@@ -40,7 +40,7 @@ Date: 2019-03-08
4040
------------------------
4141

4242
Date: 2019-03-18
43-
添加新增eproot账号功能,防止系统没有除root账号外的其余账号,配置了禁止root远程,导致系统无法登入
43+
添加新增openroot账号功能,防止系统没有除root账号外的其余账号,配置了禁止root远程,导致系统无法登入
4444

4545
----------------------
4646

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ sudo sh CentOS_Protective_Script.sh
5454
**功能说明**
5555
- 一键进行全部加固
5656
- 设置密码复杂度
57-
- 添加eproot账号
57+
- 添加openroot账号
5858
- 禁止root远程登入
5959
- 设置history保存行数以及命令时间,设置窗口超时时间
6060
- 更改SSH端口

0 commit comments

Comments
 (0)