设置最小密码长度不少于8个字符,密码最长使用期限为15天。将/etc/login.defs配置文件中对应的部分截图;
![](https://img-blog.csdnimg.cn/img_convert/1b6db04153042692aad029ccb9a99112.png)
![](https://img-blog.csdnimg.cn/img_convert/f9697a5b05303c218a47c1ed1b06f45f.png)
1.设置在用户登录系统时,会有“For authorized users only”提示信息,将登录系统时系统弹出提示信息界面截图;
![](https://img-blog.csdnimg.cn/img_convert/bc07b10681790e23b16983219cefae1f.png)
![](https://img-blog.csdnimg.cn/img_convert/616ba0017973be9985c838485f87f009.png)
然后:wq!保存
init 3 重启
![](https://img-blog.csdnimg.cn/img_convert/e78e532ce9b58827dc10420f9e46dfb9.png)
设置root用户的计划任务。每天早上7:50自动开启vsftpd服务,22点50时关闭;每周六的7:30时,重新启动vsftpd服务。使用crontab –l 查看计划任务,将回显结果截图;
先查看时间表
![](https://img-blog.csdnimg.cn/img_convert/7c9ddd05c5b087bf7d06d2df94c3f77e.png)
打开用户时程表配置文件
![](https://img-blog.csdnimg.cn/img_convert/f05828cf9220354f114baeb97825f790.png)
进入后i编辑,写入
![](https://img-blog.csdnimg.cn/img_convert/a57599017264e7715d3e2c5b7d576d8b.png)
保存
![](https://img-blog.csdnimg.cn/img_convert/670eb8b207ece8296548bdcd95d01d39.png)
查看日志表
![](https://img-blog.csdnimg.cn/img_convert/3dfd287a79dd4c954783d8376f62952b.png)
4.禁止匿名用户登录vsftpd服务,将/etc/vsftpd/vsftpd.conf配置文件中对应的部分截图;
vi /etc/vsftpd/vsftpd.conf进入配置文件
![](https://img-blog.csdnimg.cn/img_convert/fbffbd496595b19f26ebf7d147b2de9e.png)
找到对应的配置修改为NO
保存
限制客户端连接vsftpd服务时,同一个IP最多只能打开两个连接,将/etc/vsftpd/vsftpd.conf配置文件中对应的部分截图
vi /etc/vsftpd/vsftpd.conf进入配置文件
在配置文件最下面加上这条指令max_per_ip=2
![](https://img-blog.csdnimg.cn/img_convert/a02f61776ba8336c69732913340e7e5a.png)
将SSH服务的端口号修改为2222 ,使用命令netstat -anltp | grep sshd查看SSH服务端口信息,将回显结果截图;
![](https://img-blog.csdnimg.cn/img_convert/c723c9149956f67e670c4fcf3d668aed.png)
/查找
![](https://img-blog.csdnimg.cn/img_convert/6dc908e58f44565633992ad1d50921e1.png)
重启服务然后回显
![](https://img-blog.csdnimg.cn/img_convert/7ec1d57d8801767898aabc20f1a2373f.png)
禁止root用户通过SSH远程登录,将/etc/ssh/sshd_config 配置文件中对应的部分截图;
![](https://img-blog.csdnimg.cn/img_convert/8ffcdbd4ef8e21561a63991fbc4f2d84.png)
禁止mysql服务以管理员权限的账号运行,将/etc/my.cnf配置文件中对应的部分截图;
![](https://img-blog.csdnimg.cn/img_convert/40d6563cf5f01434dec0100defc86bf4.png)
6.删除默认数据库test, 然后使用show databases;命令查看当前的数据库信息,将回显结果截图;
![](https://img-blog.csdnimg.cn/img_convert/fb12315d27ac926b03ab3349a58bc9b8.png)
设置无密码登录
然后重启mysql服务
在登录mysql ,进去后查看数据库 show databases;
使用指令dropdatabase test;
![](https://img-blog.csdnimg.cn/img_convert/11ac6ca29a06a586017f3c7b70318a2d.png)
在查看数据库
10.将数据库用户user1的密码使用MD5加密,然后在数据库中使用select password from user where user=’user1’;命令查看user1的密码,将回显结果截图。
使用命令:update mysql.user set password=md5(‘123456’) where user=’user1’;
修改后,用题目给出的命令截图回显即可。
![](https://img-blog.csdnimg.cn/img_convert/ccaa4b97e397534f5c7b72cc64c949a8.png)