This commit is contained in:
陆柯 2019-10-09 11:43:21 +08:00
parent c27c5c235d
commit 68b8fced7c

View File

@ -26,7 +26,7 @@ sed -i "s/\/home\/$User:/\/home\/$User:\/bin\/bash/g" /etc/passwd
echo ">>> allow sudo without password: %sudo ALL=(ALL:ALL) NOPASSWD:ALL"
chmod o+w /etc/sudoers
# emacs /etc/sudoers
sed -i "s/%sudo\s+ALL*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g" /etc/sudoers
sed -i "s/%sudo\s\+ALL=(ALL:ALL)\sALL/%sudo\tALL=(ALL:ALL) NOPASSWD:ALL/g" /etc/sudoers
chmod o-w /etc/sudoers
echo ">>> disallow root login: #PermitRootLogin yes"