Skip to content

Commit

Permalink
Merge pull request #19 from StrangeRanger/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeRanger authored Dec 21, 2024
2 parents e61bd4c + a7465a9 commit 5757b14
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
6 changes: 6 additions & 0 deletions hardening/Root Locker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v1.0.5 - 2024-12-20

### Changed

- Improved the colorization of the output text.

## v1.0.4 - 2024-09-11

### Changed
Expand Down
21 changes: 18 additions & 3 deletions hardening/Root Locker/root-locker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,26 @@
# Disabling the root account doesn't prevent users from using something like `sudo su`
# to gain root access.
#
# Version: v1.0.4
# Version: v1.0.5
# License: MIT License
# Copyright (c) 2020-2024 Hunter T. (StrangeRanger)
#
########################################################################################

read -rp "We will now disable the root account. Press [Enter] to continue."
dsenableroot -d
C_GREEN="$(printf '\033[0;32m')"
C_BLUE="$(printf '\033[0;34m')"
C_RED="$(printf '\033[1;31m')"
C_NC="$(printf '\033[0m')"

C_SUCCESS="${C_GREEN}==>${C_NC} "
C_ERROR="${C_RED}ERROR:${C_NC} "
C_INFO="${C_BLUE}==>${C_NC} "


read -rp "${C_INFO}We will now disable the root account. Press [Enter] to continue."
dsenableroot -d || {
echo -e "\n${C_ERROR}Failed to disable the root account"
exit 1
}

echo -e "\n${C_SUCCESS}The root account has been locked"

0 comments on commit 5757b14

Please sign in to comment.