1
0
mirror of https://github.com/tommytran732/QubesOS-Scripts synced 2024-11-09 04:11:32 -05:00

Compare commits

...

3 Commits

Author SHA1 Message Date
a396385df1
Fix indentation
Signed-off-by: Tommy <contact@tommytran.io>
2024-05-29 15:34:55 -07:00
0218816493
Add abrt to removal list
Signed-off-by: Tommy <contact@tommytran.io>
2024-05-29 15:33:52 -07:00
4200946a8d
Better umask handling
Signed-off-by: Tommy <contact@tommytran.io>
2024-05-29 12:49:37 -07:00
5 changed files with 42 additions and 7 deletions

View File

@ -22,9 +22,15 @@ unpriv(){
sudo systemctl mask debug-shell.service
# Setting umask to 077
# Does not actually work for some reason - need to check
umask 077
#This line is broken on the Debian templates for some reason - further debugging needed.
echo 'umask 077' | sudo tee -a /etc/bash.bashrc
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
# Make home directory private
sudo chmod 700 /home/*
# Harden SSH
unpriv curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/ssh/ssh_config.d/10-custom.conf | sudo tee /etc/ssh/ssh_config.d/10-custom.conf

View File

@ -15,7 +15,7 @@
# the License.
unpriv(){
sudo -u nobody "$@"
sudo -u nobody "$@"
}
# Compliance
@ -24,8 +24,10 @@ sudo systemctl mask kdump.service
# Setting umask to 077
umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
echo 'umask 077' | sudo tee -a /etc/bashrc
# Make home directory private
sudo chmod 700 /home/*
@ -117,7 +119,7 @@ sudo dnf remove -y baobab chrome-gnome-shell eog gnome-boxes gnome-calculator gn
gnome-themes-extra gnome-tour gnome-user* gnome-weather loupe snapshot totem
# Remove apps
sudo dnf remove -y cheese evince file-roller* libreoffice* mediawriter rhythmbox yelp
sudo dnf remove -y abrt cheese evince file-roller* libreoffice* mediawriter rhythmbox yelp
# Remove other packages
# We deviate from the script in TommyTran732/Linux-Setup-Scripts here, as removing yajl will break qubes integration.

View File

@ -24,8 +24,13 @@ systemctl mask kdump.service
# Setting umask to 077
umask 077
sed -i 's/umask 022/umask 077/g' /etc/bashrc
echo 'umask 077' | tee -a /etc/bashrc
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
# Make home directory private
sudo chmod 700 /home/*
# Disable timesyncd
systemctl disable --now systemd-timesyncd

View File

@ -18,6 +18,17 @@ unpriv(){
sudo -u nobody "$@"
}
# Setting umask to 077
# Does not actually work for some reason - need to check
umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
# Make home directory private
sudo chmod 700 /home/*
# Avoid phased updates
unpriv curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades | sudo tee /etc/apt/apt.conf.d/99sane-upgrades
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades

View File

@ -18,6 +18,17 @@ unpriv(){
sudo -u nobody "$@"
}
# Setting umask to 077
# Does not actually work for some reason - need to check
umask 077
sudo sed -i 's/^UMASK.*/UMASK 077/g' /etc/login.defs
sudo sed -i 's/^HOME_MODE/#HOME_MODE/g' /etc/login.defs
sudo sed -i 's/^USERGROUPS_ENAB.*/USERGROUPS_ENAB no/g' /etc/login.defs
sudo sed -i 's/umask 022/umask 077/g' /etc/bashrc
# Make home directory private
sudo chmod 700 /home/*
# Avoid phased updates
unpriv curl --proxy http://127.0.0.1:8082 https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Scripts/main/etc/apt/apt.conf.d/99sane-upgrades | sudo tee /etc/apt/apt.conf.d/99sane-upgrades
sudo chmod 644 /etc/apt/apt.conf.d/99sane-upgrades