1:测试单用户模式下更改用户密码。
[root@localhost ~]# passwd gaotest
Changing password for user gaotest.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# su - gaotest
[gaotest@localhost ~]$ exit
Logout
 
 
2:写出关闭linux和重启linux的命令
关闭 linux init 0
           Halt
           Shutdown –h now
           Poweroff
重启 Linux: reboot
           Init 6
           Shutdown –r now
 
3:开机自动在/home目录新建任意文件或者目录
[root@localhost etc]# vim rc.local
 
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
mkdir /home/test0
touch /var/lock/subsys/local
wq
 
 
Reboot 后结果
[root@localhost /]# ls
app   dev   lib         media net        proc selinux tftpboot var
bin   etc   lib64       misc   opt        root srv      tmp
boot home lost+found mnt    Oracal10G sbin sys      usr
[root@localhost /]# cd home
[root@localhost home]# ll
total 20
drwx------ 4 gaotest gaotest 4096 Nov 3 20:52 gaotest
drwx------ 4 oracal oracal 4096 Nov 2 20:41 oracal
drwxr-xr-x 2 root    root    4096 Nov 3 21:35 test0
drwx------ 4 user1   user1   4096 Nov 2 20:42 user1
drwx------ 4 user2   user2   4096 Nov 2 20:42 user2
[root@localhost home]#