将 sudo 用户添加免密码选项
function set_sudoers(){
local target="/etc/sudoers"
sudo grep "%sudo" $target | grep "NOPASSWD: ALL" || echo -e "%sudo\x20ALL=(ALL:ALL)\x20NOPASSWD:\x20ALL" | sudo tee -a $target && log_suss "sudoers 添加成功"
}
function set_sudoers(){
local target="/etc/sudoers"
sudo grep "%sudo" $target | grep "NOPASSWD: ALL" || echo -e "%sudo\x20ALL=(ALL:ALL)\x20NOPASSWD:\x20ALL" | sudo tee -a $target && log_suss "sudoers 添加成功"
}