mirror of
https://github.com/tommytran732/Linux-Setup-Scripts
synced 2024-12-23 07:12:07 -05:00
Better umask handling
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
2d8eb5f31d
commit
1cca00f237
@ -33,8 +33,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/*
|
||||
|
@ -50,8 +50,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/*
|
||||
|
@ -49,7 +49,9 @@ sudo chmod 700 /home/*
|
||||
|
||||
# Setting umask to 077
|
||||
umask 077
|
||||
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
|
||||
|
||||
# Setup NTS
|
||||
sudo systemctl disable --now systemd-timesyncd
|
||||
|
@ -32,6 +32,12 @@ echo 'Authorized uses only. All activity may be monitored and reported.' | sudo
|
||||
# Make home directory private
|
||||
sudo chmod 700 /home/*
|
||||
|
||||
# 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
|
||||
|
||||
# Setup NTS
|
||||
sudo systemctl disable --now systemd-timesyncd
|
||||
sudo systemctl mask systemd-timesyncd
|
||||
|
Loading…
Reference in New Issue
Block a user