2018-10-17
1、複製/etc/skel目錄為/home/tuser1,要求/home/tuser1及其內部檔案的屬組和其它使用者均沒有任何訪問許可權。

2、編輯/etc/group檔案,新增組hadoop。

3、手動編輯/etc/passwd檔案新增一行,新增使用者hadoop,其基本組ID為hadoop組的id號;其家目錄為/home/hadoop。

4、複製/etc/skel目錄為/home/hadoop,要求修改hadoop目錄的屬組和其它使用者沒有任何訪問許可權。

5、修改/home/hadoop目錄及其內部所有檔案的屬主為hadoop,屬組為hadoop。
chown –R hadoop:hadoop /home/hadoop

6、顯示/proc/meminfo檔案中以大寫或小寫S開頭的行;用兩種方式;


7、顯示/etc/passwd檔案中其預設shell為非/sbin/nologin的使用者;

8、顯示/etc/passwd檔案中其預設shell為/bin/bash的使用者;

9、找出/etc/passwd檔案中的一位數或兩位數;

10、顯示/boot/grub/grub.conf中以至少一個空白字元開頭的行;

11、顯示/etc/rc.d/rc.sysinit檔案中以#開頭,後面跟至少一個空白字元,而後又有至少一個非空白字元的行;

12、打出netstat -tan命令執行結果中以‘LISTEN’,後或跟空白字元結尾的行;

13、新增使用者bash, testbash, basher, nologin (此一個使用者的shell為/sbin/nologin),而後找出當前系統上其使用者名稱和預設shell相同的使用者的資訊

egrep "\<^([[:alpha:]]+\>).*\1$" /etc/passwd
