Changeset 120

Show
Ignore:
Timestamp:
12/07/07 12:36:30 (1 year ago)
Author:
slawrence
Message:

Added/fixed STIG scripts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RHEL5/scripts/stig-fix/cat1/gen000560.sh

    r113 r120  
    1010echo '===================================================' 
    1111for USERINFO in `cat /etc/shadow`; do 
    12         if [ -z `echo $USERINFO | cut -d: -f2`
     12        if [ -z "`echo $USERINFO | cut -d: -f2`"
    1313        then 
    1414                /usr/sbin/usermod -L -s /dev/null `echo $USERINFO | cut -d: -f1`  
  • trunk/RHEL5/scripts/stig-fix/cat1/lnx00320.sh

    r115 r120  
    77echo '                   special privilege.' 
    88echo '===================================================' 
    9 userdel shutdown 
    10 userdel halt 
    11 userdel sync 
     9/usr/sbin/userdel shutdown 
     10/usr/sbin/userdel halt 
     11/usr/sbin/userdel sync 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen000020.sh

    r115 r120  
    1010echo '===================================================' 
    1111echo "" >> /etc/inittab 
    12 echo "Require password in single-user mode" >> /etc/inittab 
     12echo "#Require password in single-user mode" >> /etc/inittab 
    1313echo "~:S:wait:/sbin/sulogin" >> /etc/inittab 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen001020.sh

    r115 r120  
    1818 
    1919# Add a User who is in the users group allowing access to the system 
    20 adduser -G users,wheel CLIPUser 
     20/usr/sbin/adduser -G users,wheel CLIPUser 
    2121passwd CLIPUser < CLIPUserPassword 
    2222 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen001120.sh

    r112 r120  
    66echo 'Patching GEN001120: Do not allow root remote login' 
    77echo '===================================================' 
    8 sed -i "/^#PermitRootLogin/ -c\ 
     8sed -i "/^#PermitRootLogin/ c\ 
    99PermitRootLogin no" /etc/ssh/sshd_config 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen001800.sh

    r110 r120  
    77echo '                    skeleton files' 
    88echo '===================================================' 
    9 find /etc/skel -t f -exec chmod 644 '{}' \; 
     9find /etc/skel -type f -exec chmod 644 '{}' \; 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen002980.sh

    r110 r120  
    66echo 'Patching GEN002980: Set permissions of cron.allow' 
    77echo '===================================================' 
     8touch /etc/cron.allow 
    89chmod 600 /etc/cron.allow 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen003060.sh

    r110 r120  
    11#!/bin/bash 
    22 
    3 ## (GEN003060: CAT II) The SA will ensure default system accounts (with the  
    4 ## possible exception of root) will not be listed in the cron.allow file. If  
    5 ## there is only a cron.deny file, the default accounts (with the possible  
     3## (GEN003060: CAT II) The SA will ensure default system accounts (with the 
     4## possible exception of root) will not be listed in the cron.allow file. If 
     5## there is only a cron.deny file, the default accounts (with the possible 
    66## exception of root) will be listed there. 
    77echo '===================================================' 
    8 echo 'Patching GEN003060: Limit default system accounts
     8echo 'Patching GEN003060: Limit default account
    99echo '                    cron abilities' 
    1010echo '===================================================' 
    1111echo 'root' > /etc/cron.allow 
    12 echo -n > /etc/cron.deny 
    13 for NAME in `cut -d: -f1 /etc/passwd`; do 
    14         NAMEID=`id -u $NAME` 
    15         if [ $NAMEID -lt 500 -a $NAME != 'root' ]; then 
    16                 echo $NAME >> /etc/cron.deny 
    17         fi 
    18 done; 
     12awk -F: '{print $1}' /etc/passwd | grep -v root > /etc/cron.deny 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen003100.sh

    r112 r120  
    1212chmod 755 /etc/cron.monthly 
    1313chmod 755 /etc/cron.d 
    14 chmod 755 /var/spool/crond 
     14chmod 755 /var/spool/cron 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen003600.sh

    r115 r120  
    55echo ' Patching GEN003600: Set network parameters'  
    66echo '===================================================' 
    7 echo <<EOF > /etc/sysctl.conf 
     7cat <<EOF > /etc/sysctl.conf 
    88net.ipv4.ip_forward     = 0 
    99net.ipv4.tcp_max_syn_backlog = 1280 
  • trunk/RHEL5/scripts/stig-fix/cat2/gen004000.sh

    r115 r120  
    77echo '                     root user only.' 
    88echo '===================================================' 
    9 chmod 700 /usr/sbin/traceroute 
     9whereis traceroute | cut -d " " -f 2 | xargs chmod 700 
  • trunk/RHEL5/scripts/stig-fix/cat2/lnx00340.sh

    r115 r120  
    77echo ' Patching LNX00340: Disable unnecessary accounts.' 
    88echo '===================================================' 
    9 userdel news 
    10 userdel operator 
    11 userdel games 
    12 userdel gopher 
    13 userdel nfsnobody 
     9/usr/sbin/userdel news 
     10/usr/sbin/userdel operator 
     11/usr/sbin/userdel games 
     12/usr/sbin/userdel gopher 
     13/usr/sbin/userdel nfsnobody 
  • trunk/RHEL5/scripts/stig-fix/cat3/gen001780.sh

    r112 r120  
    99FILES="/etc/profile /etc/bashrc /etc/environment" 
    1010for FILE in $FILES; do 
    11         echo "mesg -n" >> $FILE 
     11        echo "mesg n" >> $FILE 
    1212done; 
  • trunk/RHEL5/scripts/stig-fix/cat3/gen003860.sh

    r115 r120  
    66echo 'Patching GEN003860: Disable finger daemon' 
    77echo '===================================================' 
    8 chkconfig finger off 
     8/sbin/chkconfig finger off