基線linux
linux常用基線
#! /bin/bash cp /etc/login.defs /etc/login.defs.bak sed -i '/PASS_MAX_DAYS/'d /etc/login.defs sed -i '/PASS_MIN_DAYS/'d /etc/login.defs sed -i '/PASS_MIN_LEN/'d /etc/login.defs sed -i '/PASS_WARN_AGE/'d /etc/login.defs sed -i '$aPASS_MAX_DAYS 90' /etc/login.defs sed -i '$aPASS_MIN_DAYS 10' /etc/login.defs sed -i '$aPASS_MIN_LEN 8' /etc/login.defs sed -i '$aPASS_WARN_AGE 7' /etc/login.defs cp /etc/profile /etc/profile.bak sed -i '/TMOUT/'d /etc/profile sed -i '$aexport TMOUT=300' /etc/profile source /etc/profile sed -i '$aumask 027' /etc/profile source /etc/profile cp /etc/pam.d/passwd /etc/pam.d/passwd.bak sed -i '$apassword required pam_pwquality.so retry=3' /etc/pam.d/passwd echo 'change password Strategy' cp /etc/security/pwquality.conf /etc/security/pwquality.conf.bak sed -i '/minlen/'d /etc/security/pwquality.conf sed -i '/dcredit/'d /etc/security/pwquality.conf sed -i '/ucredit/'d /etc/security/pwquality.conf sed -i '/lcredit/'d /etc/security/pwquality.conf sed -i '/ocredit/'d /etc/security/pwquality.conf sed -i '$aminlen = 8' /etc/security/pwquality.conf sed -i '$adcredit = -1' /etc/security/pwquality.conf sed -i '$aucredit = -1 ' /etc/security/pwquality.conf sed -i '$alcredit = -1 ' /etc/security/pwquality.conf sed -i '$aocredit = -1' /etc/security/pwquality.conf sed -i '$a * soft core 0' /etc/security/limits.conf sed -i '$a * hard core 0' /etc/security/limits.conf sed -i '$aauth sufficient pam_rootok.so' /etc/pam.d/su sed -i '$aauth required pam_wheel.so use_uid' /etc/pam.d/su chmod 644 /etc/passwd chmod 400 /etc/shadow chmod 644 /etc/group chmod 644 /etc/services chmod 600 /etc/xinetd.conf chmod 600 /etc/security chmod 644 /etc/passwd chmod 600 /etc/shadow chmod 644 /etc/group chattr +a /var/log/messages
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2837529/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GNU/Linux安全基線與加固-0.1Linux
- 基於linux下unzip離線安裝Linux
- 基於linux離線部署nginx,使用rpmLinuxNginx
- Linux基礎命令---lftp連線ftp伺服器LinuxFTP伺服器
- 線性基
- CSS基線之道CSS
- Nginx安全基線Nginx
- 線性基模板
- 【Linux基礎教程】常用的Python MySQL連線庫有哪些?LinuxPythonMySql
- 無基線不安全!淺談安全基線檢查
- 測量、基線和效能優化之二:基線和效能優化
- LINUX 硬連線和軟連線Linux
- CobaltStrike上線LinuxLinux
- MySQL安全配置基線MySql
- 異或線性基
- 無線基礎配置
- linux基礎Linux
- linux 的軟連線與硬連線Linux
- 配置pycharm連線linuxPyCharmLinux
- linux連線window cmdLinux
- linux 網線共享wifiLinuxWiFi
- 【Linux基礎】Linux目錄Linux
- oracle之 AWR固定基線Oracle
- 線性代數基礎
- WiFi基礎(六):天線基礎知識WiFi
- linux基礎操作Linux
- linux 命令 基礎Linux
- Linux基礎配置Linux
- Linux 程式基礎Linux
- Linux shell 基礎Linux
- Linux基礎命令Linux
- vnc遠端連線linux,vnc遠端連線linux的具體方法。VNCLinux
- vnc遠端連線linux,vnc遠端連線linux的具體操作VNCLinux
- Linux學習路線全解,Linux作業系統學習路線Linux作業系統
- 測量、基線和效能優化之三:基於測量、基線和變化的效能優化優化
- Linux 預設連線數Linux
- linux配置連線xshellLinux
- Linux 連線遠端桌面Linux