Skip to content

Commit

Permalink
Minor formatting changes for harden_ubuntu script
Browse files Browse the repository at this point in the history
  • Loading branch information
joshumax committed Nov 14, 2015
1 parent 9405c7b commit 9d5588a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Ubuntu_Hardening/harden_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ change_user_passwords() {
}

disable_guest_account() {
echo 'allow-guest=false' >> /etc/lightdm/lightdm.conf
echo "Disabled guest account."
echo 'allow-guest=false' >> /etc/lightdm/lightdm.conf
echo "Disabled guest account."
}

setup_password_history() {
echo "Setting up password history.."
# making these seperate commands for readability's sake as well as mutability.
sed -i.bak -e 's/PASS_MAX_DAYS\t[[:digit:]]\+/PASS_MAX_DAYS\t90/' /etc/login.defs
sed -i -e 's/PASS_MIN_DAYS\t[[:digit:]]\+/PASS_MIN_DAYS\t10/' /etc/login.defs
sed -i -e 's/PASS_WARN_AGE\t[[:digit:]]\+/PASS_WARN_AGE\t7/' /etc/login.defs
echo "Max days set to: 90, Min days: 10, Warn age: 7."
echo "Setting up password history.."
# making these seperate commands for readability's sake as well as mutability.
sed -i.bak -e 's/PASS_MAX_DAYS\t[[:digit:]]\+/PASS_MAX_DAYS\t90/' /etc/login.defs
sed -i -e 's/PASS_MIN_DAYS\t[[:digit:]]\+/PASS_MIN_DAYS\t10/' /etc/login.defs
sed -i -e 's/PASS_WARN_AGE\t[[:digit:]]\+/PASS_WARN_AGE\t7/' /etc/login.defs
echo "Max days set to: 90, Min days: 10, Warn age: 7."
}

disable_root_account() {
Expand Down

0 comments on commit 9d5588a

Please sign in to comment.