<commit_before>#!/bin/sh
#MIT Licence 
#Copyright (c) <NAME>, <NAME>
unalias -a #Get rid of aliases

#--------- Change Root Password ----------------
passwd
echo "Please change other user's passwords too"

#--------- Check and Change UID's of 0 not Owned by Root ----------------
touch /zerouidusers

cut -d: -f1,3 /etc/passwd | egrep ':0$' | cut -d: -f1 | grep -v root > /zerouidusers

if [ -s /zerouidusers ]
then
     echo "There are Zero UID Users! Fix Now!"
else
     echo "No Zero UID Users"
fi


#--------- Allow Only Root Cron ----------------
cd /etc/
cd /etc/
/bin/rm -f cron.deny at.deny
echo root >cron.allow
echo root >at.allow
/bin/chown root:root cron.allow at.allow
/bin/chmod 400 cron.allow at.allow

#--------- Securing Apache ----------------
chown -R root:root /etc/apache2
chown -R root:root /etc/apache

if [ -e /etc/apache2/apache2.conf ]; then
	echo \<Directory \> >> /etc/apache2/apache2.conf
	echo -e ' \t AllowOverride None' >> /etc/apache2/apache2.conf
	echo -e ' \t Order Deny,Allow' >> /etc/apache2/apache2.conf
	echo -e ' \t Deny from all' >> /etc/apache2/apache2.conf
	echo \<Directory \/\> >> /etc/apache2/apache2.conf<commit_msg>Update Allow Only Root Cron<commit_after>#!/bin/sh
#MIT Licence 
#Copyright (c) <NAME>, <NAME>
unalias -a #Get rid of aliases

#--------- Change Root Password ----------------
passwd
echo "Please change other user's passwords too"

#--------- Check and Change UID's of 0 not Owned by Root ----------------
touch /zerouidusers

cut -d: -f1,3 /etc/passwd | egrep ':0$' | cut -d: -f1 | grep -v root > /zerouidusers

if [ -s /zerouidusers ]
then
     echo "There are Zero UID Users! Fix Now!"
else
     echo "No Zero UID Users"
fi


#--------- Allow Only Root Cron ----------------
cd /etc/
/bin/rm -f cron.deny at.deny
echo root >cron.allow
echo root >at.allow
/bin/chown root:root cron.allow at.allow
/bin/chmod 644 cron.allow at.allow

#--------- Securing Apache ----------------
chown -R root:root /etc/apache2
chown -R root:root /etc/apache

if [ -e /etc/apache2/apache2.conf ]; then
	echo \<Directory \> >> /etc/apache2/apache2.conf
	echo -e ' \t AllowOverride None' >> /etc/apache2/apache2.conf
	echo -e ' \t Order Deny,Allow' >> /etc/apache2/apache2.conf
	echo -e ' \t Deny from all' >> /etc/apache2/apache2.conf
	echo \<Directory \/\> >> /etc/apache2/apache2.conf
{'fraction_non_alphanumeric': 0.21106821106821108, 'fraction_numerical': 0.018018018018018018, 'mean_word_length': 2.2524407252440724, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4840686', 'n_tokens_mistral': 857, 'n_tokens_neox': 818, 'n_words': 267}