Skip to content

Commit 5757b14

Browse files
Merge pull request #19 from StrangeRanger/dev
2 parents e61bd4c + a7465a9 commit 5757b14

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

hardening/Root Locker/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
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).
66

7+
## v1.0.5 - 2024-12-20
8+
9+
### Changed
10+
11+
- Improved the colorization of the output text.
12+
713
## v1.0.4 - 2024-09-11
814

915
### Changed

hardening/Root Locker/root-locker.bash

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,26 @@
77
# Disabling the root account doesn't prevent users from using something like `sudo su`
88
# to gain root access.
99
#
10-
# Version: v1.0.4
10+
# Version: v1.0.5
1111
# License: MIT License
1212
# Copyright (c) 2020-2024 Hunter T. (StrangeRanger)
1313
#
1414
########################################################################################
1515

16-
read -rp "We will now disable the root account. Press [Enter] to continue."
17-
dsenableroot -d
16+
C_GREEN="$(printf '\033[0;32m')"
17+
C_BLUE="$(printf '\033[0;34m')"
18+
C_RED="$(printf '\033[1;31m')"
19+
C_NC="$(printf '\033[0m')"
20+
21+
C_SUCCESS="${C_GREEN}==>${C_NC} "
22+
C_ERROR="${C_RED}ERROR:${C_NC} "
23+
C_INFO="${C_BLUE}==>${C_NC} "
24+
25+
26+
read -rp "${C_INFO}We will now disable the root account. Press [Enter] to continue."
27+
dsenableroot -d || {
28+
echo -e "\n${C_ERROR}Failed to disable the root account"
29+
exit 1
30+
}
31+
32+
echo -e "\n${C_SUCCESS}The root account has been locked"

0 commit comments

Comments
 (0)