linux安全配置_第1頁(yè)
linux安全配置_第2頁(yè)
linux安全配置_第3頁(yè)
linux安全配置_第4頁(yè)
linux安全配置_第5頁(yè)
已閱讀5頁(yè),還剩27頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、第一章 跟蹤安全更新1. 確認(rèn)yum security插件已安裝rootserverX # yum list yum-plugin-security2. 生成更新公告報(bào)告rootserverX # yum updateinfo3. 生成包括RPM包的更新公告報(bào)告rootserverX # yum updateinfo list4. 查看指定的安全公告rootserverX # yum updateinfo RHSA-2013:08205. 生成指定CVE在本機(jī)的全部更新rootserverX # yum updateinfo list -cve

2、=CVE-2013-0775單元測(cè)試1. 對(duì)本機(jī)適用的安全更新公告、bug修復(fù)公告和增強(qiáng)性公告進(jìn)行計(jì)數(shù)rootserverX # yum updateinfo2. 本機(jī)可用的安全更新公告中包括多少安全軟件包rootserverx # yum -security list updates3. 本機(jī)適用的嚴(yán)重級(jí)別威脅安全更新公告有多少rootserverX # yum updateinforootserverX # yum updateinfo list | grep 'Critical' | cut -f1 -d' 

3、9; | sort -u | wc -l4. 安裝下列哪個(gè)軟件包可解決當(dāng)前的安全公告問(wèn)題rootsomebox # yum updateinfo list qemu-kvm.RHBA-2012:1121 bugfix              qemu-kvm-2:-2.295.e16_3.1.x86_64RHSA-2012:1234 Important/sec.      qemu-kvm-2:-2.295.e16_3.2.x86_64RHB

4、A-2012:1585 bugfix              qemu-kvm-2:-2.295.e16_3.5.x86_64RHBA-2012:1519 bugfix              qemu-kvm-2:-2.295.e16_3.8.x86_64RHBA-2012:1582 bugfix              qemu-kvm-2:0.

5、12.1.2-2.295.e16_3.10.x86_64RHBA-2013:0527 bugfix              qemu-kvm-2:-2.355.e16.x86_64RHBA-2013:0539 bugfix              qemu-kvm-2:-2.355.e16_4.1.x86_64RHSA-2013:0609 Important/Sec.     qemu-kv

6、m-2:-2.355.e16_4.2.x86_645. 安裝下列哪個(gè)軟件包可解決當(dāng)前的安全公告問(wèn)題rootsomebox # yum updateinfo list openldap.RHSA-2012:1151 Low/Sec.            openldap-2.4.23-26.e16_3.2.x86_64RHBA-2013:0364 bugfix              openldap-2.4.23-31.e16.x86_

7、64RHBA-2013:0598 bugfix              openldap-2.4.23-32.e16_4.x86_64updateinfo list done6. 如何查看安全公告RHSA-2013:0689rootserverX # yum updateinfo RHSA-2013:06897. 列出解決RHSA-2013:0689所需要的包rootserverX # yum updateinfo list -advisory=RHSA-2013:06898. 列出解決CVE

8、-2012-6329所需要的包rootserverX # yum updateinfo list -cve=CVE-2012-6329第二章 管理軟件更新課堂演示1. 獲得當(dāng)前軟件安裝列表并存放到指定位置rootserverX $# rpm -qa > /root/pre-update-software.$(date +%Y%m%d)2. 獲得全部未決更新報(bào)告并存放到指定位置rootserverX $# yum updateinfo > /root/updateinfo-report.$(date +%Y%m%d)3. 解決全部未決安全更新rootse

9、rverX $# yum update -security -y4. 確認(rèn)全部未決更新都已修復(fù),(或許你會(huì)收到關(guān)于Kernel較老的警告,此警告將在用新Kernel重啟后消失)rootserverX $# yum updateinfo課堂演示1. 導(dǎo)入指定的GPG密匙rootserverX $# rpm -import /net/instructor/var/ftp/pub/materials/GLS-GPG-KEY.txtrootserverX $# rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-redha

10、t-release2. 確認(rèn)指定的RPM是經(jīng)過(guò)可信GPG密匙簽名的rootserverX $# rpm -K /net/instructor/var/ftp/pub/rhel6/Errata/rhel-x86_64-server-6/yelp-2.28.1-17.el6_3.x86_64.rpm3. 列出當(dāng)前GPG密匙環(huán)rootserverX $# rpm -qa | grep gpg-pubkey4. 刪除不用于簽署yelp包的GPG密匙rootserverX $# rpm -vvK /net/instructor/var/ftp/pub/rhe16/Errat

11、a/rhel-x86_64-server-6/yelp-2.28.1-17.e16_3.x86_64.rpm 2> /dev/nullrootserverX $# rpm -e gpg-pubkey-53067gee-4f6b7813 gpg-pubkey-2fa658e0-45700c695. 判斷給定兩個(gè)RPM包的安全性rootserverX $# rpm -qp -scripts /net/instructor/var/ftp/pub/materials/FluffyMcAwesome-A-*rootserverX $# rpm -qp -script

12、s /net/instructor/var/ftp/pub/materials/FluffyMcAwesome-B-*Found rm - rf /* in A package, so delete A package第三章 創(chuàng)建文件系統(tǒng)1. 利用vgsrv卷組剩余空間創(chuàng)建名為luks的邏輯卷rootserverX # vgdisplay vgsrvrootserverX # lvcreate -n luks -l 12 vgsrv2. 用LUKS方式加密新卷rootserverX # cryptsetup luksFormat /dev/vg

13、srv/luksYES, password, password3. 打開(kāi)加密卷并命名為cryptdiskrootserverX # cryptsetup luksOpen /dev/vgsrv/luks cryptdiskpassword4. 在加密卷上創(chuàng)建ext4文件系統(tǒng)rootserverX # mkfs -t ext4 /dev/mapper/cryptdisk5. 創(chuàng)建掛載點(diǎn)并掛載加密卷rootserverX # mkdir -p /datarootserverX # mount /dev/mapper/cryptdisk /data6. 創(chuàng)建用

14、于解鎖加密卷的密匙文件rootserverX # dd if=/dev/urandom of=/root/luks-passphrase bs=4096 count=1rootserverX # chmod 600 /root/luks-passphraserootserverX # cryptsetup luksAddKey /dev/vgsrv/luks /root/luks-passphrasepassword7. 修改配置,使加密卷可在啟動(dòng)時(shí)自動(dòng)打開(kāi)rootserverX # vim /etc/crypttabcryptdisk   &

15、#160;  /dev/vgsrv/luks      /root/luks-passphrase8. 修改配置,使加密卷可以自動(dòng)掛載rootserverX # vim /etc/fstab/dev/mapper/cryptdisk      /data      ext4      defaults      1 29. 驗(yàn)證rootserverX # rebootrootserverX # df -h

16、/data案例(加密/home)1. 檢查磁盤(pán)使用rootserverX # df /boot2. 創(chuàng)建分區(qū)rootserverX # fdisk -cu /dev/vdap, n, p, 3, Enter, Enter, wrootserverX # reboot3. 加密塊設(shè)備rootserverX # cryptsetup luksFormat /dev/vda3YES, password, password4. 打開(kāi)加密分區(qū)并創(chuàng)建文件系統(tǒng)rootserverX # cryptsetup luksOpen /dev/vda3 homepa

17、sswordrootserverX # mkfs -t ext4 /dev/mapper/home5. 將/home內(nèi)容移動(dòng)到新的掛載點(diǎn)rootserverX # mount /dev/mapper/home /mntrootserverX # mv /home/* /mntn6. 創(chuàng)建密匙文件,配置開(kāi)機(jī)解鎖rootserverX # dd if=/dev/urandom of=/root/home-luks-key bs=4096 count=1rootserverX # chmod 600 /root/home-luks-keyrootse

18、rverX # cryptsetup luksAddKey /dev/vda3 /root/home-luks-keypasswordrootserverX # vim /etc/crypttabhome      /dev/vda3      /root/home-luks-key7. 修改開(kāi)機(jī)掛載rootserverX # vim /etc/fstab/dev/mapper/home      /home      ext4   &

19、#160;  defaults      1 28. 驗(yàn)證rootserverX # rebootrootserverX # df /home第四章 特殊權(quán)限管理1. 以root身份登錄,拷貝/bin/ping到student用戶(hù)家目錄,保留權(quán)限,同時(shí)在此目錄下創(chuàng)建一個(gè)簡(jiǎn)單腳本rootserverX # cp -a /bin/ping studentrootserverX # echo 'echo this is a shell script' > student/test-scriptroo

20、tserverX # chmod 755 student/test-script2. 在另一窗口以student身份登錄,執(zhí)行ping和之前創(chuàng)建的簡(jiǎn)單腳本studentserverX $ ./ping localhost(成功)studentserverX $ ./test-script(成功)3. 在之前窗口用nosuid選項(xiàng)重新掛載/homerootserverX # mount -o remount,nosuid /homerootserverX # mount | grep home4. 以student身份再次執(zhí)行ping與之前創(chuàng)建的

21、簡(jiǎn)單腳本studentserverX $ ./ping localhost(失?。﹕tudentserverX $ ./test-script(成功)5. 在之前窗口用noexec選項(xiàng)重新掛載/homerootserverX # mount -o remount,noexec /homerootserverX # mount | grep home6. 以student身份再次執(zhí)行ping與之前創(chuàng)建的簡(jiǎn)單腳本studentserverX $ ./ping localhost(失?。﹕tudentserverX $ 

22、./test-script(失?。?. 在之前窗口用exec選項(xiàng)重新掛載/homerootserverX # mount -o remount,exec /homerootserverX # mount | grep home8. 以student身份再次執(zhí)行ping與之前創(chuàng)建的簡(jiǎn)單腳本studentserverX $ ./ping localhost(成功)studentserverX $ ./test-script(成功)課堂演示1. 創(chuàng)建一個(gè)簡(jiǎn)單文本文件rootserverX # echo 'This is a

23、 sample file with text in it.' > sample.txt2. 檢查文件屬性rootserverX # lsattr sample.txt3. 激活文件的不可變屬性rootserverX # chattr +i sample.txtrootserverX # lsattr sample.txt4. 在文件中增加一行(失?。﹔ootserverX # echo 'More text' >> sample.txt5. 覆蓋此文件(失?。﹔ootserverX # echo 

24、9;Different text' > sample.txt6. 刪除此文件(失?。﹔ootserverX # rm -f sample.txt7. 取消文件的不可變屬性rootserverX # chattr -i sample.txtrootserverX # lsattr sample.txt8. 在文件中增加一行(成功)rootserverX # echo 'More text' >> sample.txt9. 覆蓋此文件(成功)rootserverX # echo '

25、;Different text ' > sample.txt10. 刪除此文件(成功)rootserverX # rm -f sample.txt11. 創(chuàng)建一個(gè)簡(jiǎn)單文本文件rootserverX # echo 'This is a sample file with text in it.' > sample.txt12. 激活文件的僅追加屬性rootserverX # chattr +a sample.txtrootserverX # lsattr sample.txt13. 

26、在文件中增加一行(成功)rootserverX # echo 'More text'>> sample.txt14. 覆蓋此文件(失?。﹔ootserverX # echo 'Different text' > sample.txt15. 刪除此文件(失?。﹔ootserverX # rm -f sample.txt16. 取消文件的僅追加屬性rootserverX # chattr -a sample.txtrootserverX # lsattr sample.txt17

27、. 覆蓋此文件(成功)rootserverX # echo 'Different text' > sample.txt18. 刪除此文件(成功)rootserverX #  rm -f sample.txt案例(加固文件系統(tǒng)和文件)1. 查看/home當(dāng)前的掛載屬性rootserverX # mount | grep homerootserverX # grep home /etc/fstab2. 在/etc/fstab中改變/home的屬性增加nodev和noexecrootserverX #

28、0;vim /etc/fstab/dev/mapper/vgsrv-home      /home      ext4      nodev,noexec      1 23. 重新激活/homerootserverX # mount -o remount /home4. 進(jìn)一步查看/home的超塊掛載屬性rootserverX # tune2fs -l /dev/vgsrv/home | grep options5. 改變超塊掛載屬性為acl和user_

29、xattrrootserverX # tune2fs -o acl,user_xattr /dev/vgsrv/homerootserverX # tune2fs -l /dev/vgsrv/home | grep options6. 創(chuàng)建文件/var/log/redhat-training查看原始文件屬性rootserverX # touch /var/log/redhat-trainingrootserverX # lsattr /var/log/redhat-training7. 激活適當(dāng)?shù)奈募傩允刮募荒鼙桓采w或移除rootserverX #&

30、#160;chattr +a /var/log/redhat-trainingrootserverX # lsattr /var/log/redhat-training8. 確認(rèn)文件不能被覆蓋或移除rootserverX # wc -l /var/log/redhat-trainingrootserverX # echo test > /var/log/redhat-trainingrootserverX # rm /var/log/redhat-trainingrootserverX # date >> /var/log/r

31、edhat-trainingrootserverX # wc -l /var/log/redhat-training第五章 管理附加文件權(quán)限1. 將用戶(hù)權(quán)限提升到一個(gè)可執(zhí)行、二進(jìn)制文件的屬組在文件上設(shè)置SetGID2. 防止非授權(quán)用戶(hù)刪除或重命名不屬于他們的文件在目錄上設(shè)置Sticky3. 使文件繼承上級(jí)目錄的屬組權(quán)限在目錄上設(shè)置SetGID4. 將用戶(hù)權(quán)限提升至一個(gè)可執(zhí)行、二進(jìn)制文件的屬主在文件上設(shè)置SetUID課堂演示1. 以student身份登錄,查看/usr/local/bin/rm-tmp-redhat權(quán)限,刪除/tmp/redhat后,執(zhí)行此文件,觀(guān)察輸出students

32、erverX $ ls -l /usr/local/bin/rm-tmp-redhatstudentserverX $ rm-tmp-redhatstudentserverX $ ls -l /tmp/redhatstudentserverX $ rm-tmp-redhat2. 以root身份創(chuàng)建/tmp/redhatrootserverX # touch /tmp/redhat3. 以student身份用rm-tmp-redhat刪除/tmp/redhatstudentserverX $ ls -l /tmp/redhatstude

33、ntserverX $ rm-tmp-redhatstudentserverX $ ls -l /tmp/redhat4. 確認(rèn)root可以刪除/tmp/redhatrootserverX # rm /tmp/redhatrootserverX # ls -l /tmp/redhat5. 以root身份重建/tmp/redhat,并對(duì)rm-tmp-redhat增加SetUID權(quán)限r(nóng)ootserverX # touch /tmp/redhatrootserverX # chmod u+s /usr/local/bin/rm-tmp-re

34、dhat6. 以student身份執(zhí)行rm-tmp-redhatstudentserverX $ ls -l /usr/local/bin/rm-tmp-redhatstudentserverX $ ls -l /tmp/redhatstudentserverX $ rm-tmp-redhatstudentserverX $ ls - l /tmp/redhat多項(xiàng)選擇1. 使用find命令查找/usr/bin下使用SetUID的文件,find命令需要哪個(gè)參數(shù)配合-4000/40002. 使用find命令查找/usr/bin下使用SetGID的

35、文件,find命令需要哪個(gè)參數(shù)配合/20003. 使用find命令查找/usr/bin下使用SetUID或者使用SetGID的文件,find命令需要哪個(gè)參數(shù)配合/60004. 使用find命令查找/usr/bin下使用Sticky的文件,find命令需要哪個(gè)參數(shù)配合-1000/1000課后練習(xí)1. 以root身份在student家目錄建bin目錄,將vim拷貝到bin目錄并重命名為supervimrootserverX # mkdir student/binrootserverX # cp /usr/bin/vim student/bin/supervi

36、mrootserverX # ls -l student/bin/supervim2. 對(duì)supervim增加SetUIDrootserverX # chmod u+s student/bin/supervimrootserverX # ls -l student/bin/supervim3. 以student身份運(yùn)行supervim,觀(guān)察運(yùn)行環(huán)境,觀(guān)察退出supervim shell后的變化,用supervim可將文件存儲(chǔ)的位置,是否可以改變屬于root的文件studentserverX $ supervim /usr/bin/sample-tests

37、tudentserverX $ ls -l /usr/bin/sample-teststudentserverX $ ls -l /usr/bin/mesgstudentserverX $ supervim /usr/bin/mesgstudentserverX $ ls -l /usr/bin/mesgstudentserverX $ supervim:shbash-4.1$ id4. 以root身份創(chuàng)建簡(jiǎn)單的可執(zhí)行腳本checkhome,查看當(dāng)前目錄中有特殊權(quán)限的文件,拷貝另一個(gè)系統(tǒng)可執(zhí)行文件,再次執(zhí)行checkhomeroots

38、erverX # vim /usr/local/bin/checkhome#!/bin/bashPATH=/usr/bin:/bin:/usr/sbin:/sbinfind /home -perm /7000 -type f -printexitrootserverX # chmod 755 /usr/local/bin/checkhomerootserverX # checkhomerootserverX # cp -a /usr/bin/wall /home/student/bin/studentwallrootserverX # chec

39、khome第六章 監(jiān)視文件系統(tǒng)變更簡(jiǎn)答1. 哪個(gè)命令用于安裝監(jiān)視文件系統(tǒng)變更的軟件yum install -y aide2. 軟件安裝后,哪個(gè)文件用于配置感興趣的文件或目錄以及變更的類(lèi)型/etc/aide.conf3. 哪個(gè)指令用于檢測(cè)對(duì)/usr目錄下任何文件的授權(quán)和屬主變更/usr PERMS4. 完成配置后,哪個(gè)命令用于生成包含文件系統(tǒng)初始狀態(tài)的數(shù)據(jù)庫(kù)aide -init5. 數(shù)據(jù)庫(kù)文件的默認(rèn)位置/var/lib/aide/aide.db.gz6. 哪個(gè)命令用于掃描數(shù)據(jù)庫(kù)的差異aide -check案例(使用AIDE監(jiān)視文件系統(tǒng)變更)1. 以root身份安裝AIDE軟件包rootserve

40、rX # yum install -y aide2. 創(chuàng)建/etc/aide.conf的備份,將其配置為檢測(cè)/etc下文件的權(quán)限和屬主變更rootserverX # cp /etc/aide.conf /etc/aide.conf-origrootserverX # vim /etc/aide.conf./etc PERMS!/etc/mtab!/etc/.*.3. 生成初始文件數(shù)據(jù)庫(kù)rootserverX # aide -initrootserverX # mv /var/lib/aide/aide.db.new.gz /var/lib/ai

41、de/aide.db.gz4. 使用aide檢查系統(tǒng)變更rootserverX # aide -check5. 添加/etc/issue文件,不變更其默認(rèn)權(quán)限及屬主,使用aide檢查系統(tǒng)變更rootserverx # echo additional text >> /etc/issuerootserverX # aide -check6. 改變/etc/issue權(quán)限,再次使用aide檢查系統(tǒng)變更rootserverX # chmod 664 /etc/issuerootserverX # aide -checkAIDE found

42、 differences between .第七章 管理用戶(hù)賬戶(hù)課堂演示1. 以root身份登錄,查看student當(dāng)前口令超期設(shè)置rootserverX # chage -l student2. 在/etc/shadow中查看student條目rootserverX # grep student /etc/shadow3. 更改設(shè)置,使student的口令每45天必須更改一次,而新口令在生效5天后才能修改,從現(xiàn)在開(kāi)始鎖定student賬戶(hù)9個(gè)月rootserverX # EXPIRY=$(date -d now+9months +%Y-%m-%d)rootser

43、verX # chage -M 45 -m 5 -E $EXPIRY student4. 重新顯示student當(dāng)前口令超期設(shè)置以及/etc/shadow條目rootserverX # chage -l studentrootserverX # grep student /etc/shadow5. 創(chuàng)建名為neo的新用戶(hù)rootserverX # useradd neo6. 對(duì)比neo的口令超期設(shè)置rootserverX # chage -l neo7. 編輯/etc/login.defs使口令于60天后到期,在更改口令前,此口令必須至少存在5

44、天rootserverX # vim /etc/login.defs.PASS_MAX_DAYS 60PASS_MIN_DAYS 5.8. 創(chuàng)建名為neo2的新用戶(hù)rootserverX # useradd neo29. 對(duì)比neo2的口令超期設(shè)置,注意與之前的不同rootserverX # chage -l neo2課堂演示1. 找出重復(fù)的用戶(hù)名rootserverX # getent passwd | cut -d: -f1 | sort | uniq -d2. 找出重復(fù)的用戶(hù)IDrootserverX # getent pass

45、wd | cut -d: -f3 | sort -n | uniq -d案例(管理密碼有效期)1. 編輯/etc/login.defs使口令于90天后到期,在更改口令前,此口令必須至少存在2天rootserverX # vim /etc/login.defs.PASS_MAX_ DAYS 90PASS_MIN_ DAYS 2.2. 創(chuàng)建名為special的新用戶(hù)rootserverX # useradd special3. 更改special用戶(hù)的口令超期設(shè)置,使口令于120天后到期,在更改口令前,此口令必須至少存在1天rootserverX #

46、0;chage -M 120 -m 1 special第八章 管理PAM課堂實(shí)驗(yàn)1. 設(shè)置口令策略為至少12位,至少包含一個(gè)符號(hào)和一個(gè)數(shù)字,此策略對(duì)本地和遠(yuǎn)程均適用,如sshrootserverX # vim /etc/pam.d/system-authrootserverX # vim /etc/pam.d/pasword-authpassword    requisite    pam_cracklib.so try_first_pass retry=3 type= ocredit=-1 d

47、credit=-1 minlen=122. 確認(rèn)修改后的口令策略,i<3mylittleponies合法,L1b3r8yourself非法studentserverX $ passwd課堂演示1. 確認(rèn)沒(méi)有以student身份的登錄,包括圖形界面。確保下列操作只通過(guò)字符界面或ssh執(zhí)行。2. 限制student用戶(hù),使其在系統(tǒng)中的進(jìn)程不能多于5個(gè)rootserverX # vim /etc/security/limits.conf.student hard nproc 53. 以student身份登錄字符界面或ssh,開(kāi)啟五個(gè)進(jìn)程studentse

48、rverX $ cat & ; cat & ; cat & ; cat & ; cat &講解討論(封鎖非法登錄帳戶(hù))(略)案例(遵從安全策略)1. 制定新的口令策略,要求全體用戶(hù)在下次登錄時(shí)更改口令,口令至少10位,至少包括一個(gè)大寫(xiě)字母、一個(gè)數(shù)字和一個(gè)非alpha字符rootserverX # vim /etc/pam.d/system-authrootserverX # vim /etc/pam.d/pasword-authpassword    requisi

49、te    pam_cracklib.so try_first_pass retry=3 type= ocredit=-1 dcredit=-1 ucredit=-1 minlen=102. 連續(xù)輸入錯(cuò)誤口令5次,賬戶(hù)將被關(guān)閉5分鐘,記錄包括從任何渠道的錯(cuò)誤登錄,系統(tǒng)管理員將出具錯(cuò)誤登錄的報(bào)告并以用戶(hù)名排序rootserverX # vim /etc/pam.d/system-authrootserverX # vim /etc/pam.d/pasword-auth.auth required pam_env.soauth requi

50、red pam_tally2.so deny=5 unlock_time=300 quiet.account required pam_tally2.soaccount required pam_unix.so.rootserverX # pam_tally23. 允許用戶(hù)visitor至多同時(shí)開(kāi)2個(gè)會(huì)話(huà)rootserverX # vim /etc/security/limits.confvisitor hard maxlogins 2第九章 加強(qiáng)控制臺(tái)安全課堂實(shí)驗(yàn)1. 生成一個(gè)哈希的GRUB口令rootdemo # grub-cryptPassword:

51、0;redhatRetype password: redhat$6$17Pelrkwljhx17fk$kY1QRxEZUQzHbczOpUGI5B21WkadmAsayZMDFlOfJLknkYSQOqcwEQhiOpg6JGacE9uRAryZ.52oB76hrY9gNO2. 將口令加入到GRUB配置中使之成為全局口令rootdemo # vim /etc/grub.conf# Many lines of comments . . .default=0timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenupass

52、word -encrypted $6$17Pelrkwljhx17fk$kY1QRxEZUQzHbczOpUGI5B21WkadmAsayZMDFlOfJLknkYSQOqcwEQhiOpg6JGacE9uRAryZ.52oB76hrY9gNOtitle Red Hat Enterprise Linux (2.6.32-358.e16.x86_64).3. 確認(rèn)口令生效重啟后在GRUB界面輸入口令后才能編輯啟動(dòng)項(xiàng)課堂演示1. 編輯init子系統(tǒng),使control-alt-delete熱鍵失效rootserverX # cp /etc/init/control-alt-del

53、ete.conf /etc/init/control-alt-delete.overriderootserverX # vim /etc/init/control-alt-delete.override.exec /bin/true2. 下載標(biāo)準(zhǔn)的登錄條幅,使之能夠在用戶(hù)登錄前顯示rootserverX # wget -O /etc/issue3. 下載標(biāo)準(zhǔn)的接受信息,使之在成功登錄后顯示rootserverX # wget /etc/motd講解討論(變更GDM)(略)案例(按照安全策略需求設(shè)置控制臺(tái))1. 使公司的標(biāo)準(zhǔn)信息能夠顯示,包括圖形化控制臺(tái)r

54、ootserverX # wget rootserverX # cat login_banner.txt > /etc/issuerootserverX # gconftool-2 -direct -config-source xml:readwrite:/etc/gconf/gconf.xml.defaults -type bool -set /apps/gdm/simple-greeter/banner_message_enable truerootserverX # gconftool-2 -direct -config-

55、source xml:readwrite:/etc/gconf/gconf.xml.defaults -type string -set /apps/gdm/simple-greeter/banner_message_text "$(cat login_banner.txt)"2. 用戶(hù)登錄后可顯示標(biāo)準(zhǔn)化接受信息rootserverX # wget rootserverX # cat use_policy.txt > /etc/motd3. 未授權(quán)用戶(hù)不得重啟或關(guān)閉機(jī)器,包括通過(guò)圖形化控制臺(tái)rootserverX # 

56、cp /etc/init/control-alt-delete.conf /etc/init/control-alt-delete.overriderootserverX # sed -ie 's#exec.*#exec /bin/true#' /etc/init/control-alt-delete.overriderootserverX # gconftool-2 -direct -config-source xml:readwrite:/etc/gconf/gconf.xml.defaults -type bool -set /apps/gdm/sim

57、ple-greeter/disable_restart_buttons true4. 如使用圖形化控制臺(tái),不能顯示用戶(hù)列表rootserverX # gconftool-2 -direct -config-source xml:readwrite:/etc/gconf/gconf.xml.defaults -type bool -set /apps/gdm/simple-greeter/disable_user_list true5. 管理員需要設(shè)置GRUB口令,雖然可以允許啟動(dòng)預(yù)先定義的操作系統(tǒng),但不能在未輸入口令時(shí)編輯啟動(dòng)命令行rootserverX # gr

58、ub-cryptPassword: redhatRetype password: redhat$6$17Pelrkwljhx17fk$kY1QRxEZUQzHbczOpUGI5B21WkadmAsayZMDFlOfJLknkYSQOqcwEQhiOpg6JGacE9uRAryZ.52oB76hrY9gNOrootserverX # vim /etc/grub.conf# Many lines of comments . . .default=0timeout=5splashimage=(hd0,0)/grub/splash.xpm.gzhiddenmenupassword -encrypted $6$17Pelrkwljhx17fk$kY1QRxEZUQzHbczOpUGI5

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論