激情五月天婷婷,亚洲愉拍一区二区三区,日韩视频一区,a√天堂中文官网8

<ul id="buwfs"><strike id="buwfs"><strong id="buwfs"></strong></strike></ul>
    <output id="buwfs"></output>
  • <dfn id="buwfs"><source id="buwfs"></source></dfn>
      <dfn id="buwfs"><td id="buwfs"></td></dfn>
      <div id="buwfs"><small id="buwfs"></small></div>
      <dfn id="buwfs"><source id="buwfs"></source></dfn>
      1. <dfn id="buwfs"><td id="buwfs"></td></dfn>
        始創(chuàng)于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊有禮 登錄
        • 掛牌上市企業(yè)
        • 60秒人工響應
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補償
        全部產(chǎn)品
        您的位置: 網(wǎng)站首頁 > 幫助中心>文章內(nèi)容

        Linux安全配置步驟大全 (3)

        發(fā)布時間:  2012/8/10 18:07:19

        /group [root@deep]# chattr +i /etc/gshadow
           
            14. 阻止任何人su作為root.
           
            如果你不想任何人能夠su作為root,你能編輯/etc/pam.d/su加下面的行:
           
            auth sufficient /lib/security/pam_rootok.so debug
            auth required /lib/security/pam_wheel.so group=isd
           
            意味著僅僅isd組的用戶可以su作為root.
           
            然后,如果你希望用戶admin能su作為root.就運行下面的命令。
           
            [root@deep]# usermod -G10 admin
           
            16. 資源限制
           
            對你的系統(tǒng)上所有的用戶設置資源限制可以防止DoS類型攻擊(denial of service attacks)
           
            如最大進程數(shù),內(nèi)存數(shù)量等。例如,對所有用戶的限制象下面這樣:
           
            編輯/etc/security/limits.con加: * hard core 0 * hard rss 5000 * hard nproc 20
           
            你也必須編輯/etc/pam.d/login文件加/檢查這一行的存在。
           
            session required /lib/security/pam_limits.so
           
            上面的命令禁止core files“core 0”,限制進程數(shù)為“nproc 50“,且限制內(nèi)存使用    為5M“rss 5000”。
           
            17. The /etc/lilo.conf file
           
            a) Add: restricted
           
            加這一行到每一個引導映像下面,就這表明如果你引導時用(linux single),則需要一個password.
           
            b) Add: password=some_password
           
            當與restricted聯(lián)合用,且正常引導時,需要用戶輸入密碼,你也要確保lilo.conf  文件不能被不屬于root的用戶可讀,也免看到密碼明文。下面是例子:
           
            編輯/etc/lilo.conf加: boot=/dev/sda map=/boot/map install=/boot/boot.b prompt timeout=50 Default=linux restricted ?add this line. password=some_password ?add this line. image=/boot/vmlinuz-2.2.12-20 label=linux initrd=/boot/initrd-2.2.12-10.img root=/dev/sda6 read-only [root@deep]# chmod 600 /etc/lilo.conf (不再能被其他用戶可讀). [root@deep]# /sbin/lilo -v (更新lilo配置). [root@deep]# chattr +i /etc/lilo.conf(阻止該文件被修改)
           
            18. 禁止 Control-Alt-Delete 重啟動機器命令
           
            [root@deep]# vi /etc/inittab
            ca::ctrlaltdel:/sbin/shutdown -t3 -r now
            To
            #ca::ctrlaltdel:/sbin/shutdown -t3 -r now
            [root@deep]# /sbin/init q
            19. 重新設置/etc/rc.d/init.d/目錄下所有文件的許可權(quán)限
            [root@deep]# chmod -R 700 /etc/rc.d/init.d/*
           
            僅僅root可以讀,寫,執(zhí)行上述所有script file.
           
            20. The /etc/rc.d/rc.local file
           
            默認地,當你login到linux server時,它告訴你linux版本名,內(nèi)核版本名和服務器
           
            主機名。它給了你太多的信息,如果你就希望得到提示login: ,編輯/etc/rc.d/rc.local放#在下面的行前面
           
           
            # This will overwrite /etc/issue at every boot. So, make any changes you
            # want to make to /etc/issue here or you will lose them when you reboot.
            #echo "" >; /etc/issue
            #echo "$R" >;>; /etc/issue
            #echo "Kernel $(uname -r) on $a $(uname -m)" >;>; /etc/issue
            #
            #cp -f /etc/issue /etc/issue.net
            #echo >;>; /etc/issue
           
            然后,做下面的事情:
            [root@deep]# rm -f /etc/issue
            [root@deep]# rm -f /etc/issue.net
            [root@deep]# touch /etc/issue
            [root@deep]# touch /etc/issue.net
           
            ---------------------------------------------------------------------------------------
           
            21. 被root擁有的程序的位。
           
            移走那些被root擁有程序的s位標志,當然有些程序需要這個,用命令‘chmod a-s’完成這個。
           
            注:前面帶(*)號的那些程序一般不需要擁有s位標志。
           
            [root@deep]# find / -type f \( -perm -04000 -o -perm -02000 \) \-exec ls –lg {} \;
            -rwsr-xr-x 1 root root 33120 Mar 21 1999 /usr/bin/at
            *-rwsr-xr-x 1 root root 30560 Apr 15 20:03 /usr/bin/chage
            *-rwsr-xr-x 1 root root 29492 Apr 15 20:03 /usr/bin/gpasswd
            -rwsr-xr-x 1 root root 3208 Mar 22 1999 /usr/bin/disable-paste
            -rwxr-sr-x 1 root man 32320 Apr 9 1999 /usr/bin/man
            -r-s--x--x 1 root root 10704 Apr 14 17:21 /usr/bin/passwd
            -rws--x--x 2 root root 517916 Apr 6 1999 /usr/bin/suidperl
            -rws--x--x 2 root root 517916 Apr 6 1999 /usr/bin/sperl5.00503
            -rwxr-sr-x 1 root mail 11432 Apr 6 1999 /usr/bin/lockfile
            -rwsr-sr-x 1 root mail 64468 Apr 6 1999 /usr/bin/procmail
            -rwsr-xr-x 1 root root 21848 Aug 27 11:06 /usr/bin/crontab
            -rwxr-sr-x 1 root slocate 15032 Apr 19 14:55 /usr/bin/slocate
            *-r-xr-sr-x 1 root tty 6212 Apr 17 11:29 /usr/bin/wall
            *-rws--x--x 1 root root 14088 Apr 17 12:57 /usr/bin/chfn
            *-rws--x--x 1 root root 13800 Apr 17 12:57 /usr/bin/chsh
            *-rws--x--x 1 root

        億恩科技地址(ADD):鄭州市黃河路129號天一大廈608室 郵編(ZIP):450008 傳真(FAX):0371-60123888
           聯(lián)系:億恩小凡
           QQ:89317007
           電話:0371-63322206


        本文出自:億恩科技【mszdt.com】

        服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

      2. 您可能在找
      3. 億恩北京公司:
      4. 經(jīng)營性ICP/ISP證:京B2-20150015
      5. 億恩鄭州公司:
      6. 經(jīng)營性ICP/ISP/IDC證:豫B1.B2-20060070
      7. 億恩南昌公司:
      8. 經(jīng)營性ICP/ISP證:贛B2-20080012
      9. 服務器/云主機 24小時售后服務電話:0371-60135900
      10. 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
      11. 專注服務器托管17年
        掃掃關(guān)注-微信公眾號
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號總部企業(yè)基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號
          0
         
         
         
         

        0371-60135900
        7*24小時客服服務熱線