四、实验步骤及结果
- 使用命令创建用户账户test,并设置口令为mysql,设置用户名全称为mysqlInstall。
 2.使用vi编辑器,编辑一个shell文件,文件名称为passlist.sh,主要命令如下: cat /etc/passwd >xxx.txt (xxx为学号)   ???????3.将passlist.sh设置为可执行  ???????4.执行passlist.sh,使用ls命令查看文件xxx.txt的权限及所在组别信息。  使用命令从用户root切换到用户test登录系统,并切换到用户目录(/home/test)。  ???????5.删除xxx.txt文件,重复执行步骤4,查看文件权限及所在组别信息。  ???????6.重新切换至root用户,使用命令修改passlist.sh的用户权限和组权限为root,重复步骤5。   ???????7.在切换用户为test,重复步骤5   ???????8.切换用户为root,使用数字设定方式设置文件的权限,将文件passlist.sh的权限设置为777;  9、重复步骤5和步骤7,查看执行结果并比较。 对比如下:root:  Test:  ???????10.在/home/test下创建字目录a1,a2,在子目录a1下创建子目录a11  ???????11.使用命令chgrp修改目录及子目录的所有权为test;  |