mirror of
https://github.com/tommytran732/Linux-Setup-Scripts
synced 2024-12-23 07:12:07 -05:00
Update Ubuntu-Desktop-20.04-LTS.sh
This commit is contained in:
parent
ead3fefe27
commit
f7ade7918e
@ -15,6 +15,29 @@ output(){
|
||||
echo -e '\e[36m'$1'\e[0m';
|
||||
}
|
||||
|
||||
promptPassphrase() {
|
||||
PASS=""
|
||||
PASSCONF=""
|
||||
while [ -z "$PASS" ]; do
|
||||
read -s -p "Passphrase: " PASS
|
||||
echo ""
|
||||
done
|
||||
|
||||
while [ -z "$PASSCONF" ]; do
|
||||
read -s -p "Confirm passphrase: " PASSCONF
|
||||
echo ""
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
getPassphrase() {
|
||||
promptPassphrase
|
||||
while [ "$PASS" != "$PASSCONF" ]; do
|
||||
output "Passphrases did not match, try again..."
|
||||
promptPassphrase
|
||||
done
|
||||
}
|
||||
|
||||
#Moving to the home directory
|
||||
#Note that I always use /home/${USER} because gnome-terminal is wacky and sometimes doesn't load the environment variables in correctly (Right click somewhere in nautilus, click on open in terminal, then hit create new tab and you will see.)
|
||||
cd /home/${USER} || exit
|
||||
@ -56,7 +79,7 @@ echo "blacklist firewire-sbp2" | sudo tee /etc/modprobe.d/blacklist.conf
|
||||
|
||||
#GRUB hardening (Thanks to https://www.ncsc.gov.uk/collection/end-user-device-security/platform-specific-guidance/ubuntu-18-04-lts)
|
||||
echo -e "${HIGHLIGHT}Configuring grub...${NC}"
|
||||
echo "Please enter a grub sysadmin passphrase..."
|
||||
output "Please enter a grub sysadmin passphrase..."
|
||||
getPassphrase
|
||||
|
||||
echo "set superusers=\"sysadmin\"" >> /etc/grub.d/40_custom
|
||||
|
Loading…
Reference in New Issue
Block a user