Updated sudoers file to use cat EOF instead of lots of >>

This commit is contained in:
2025-08-27 22:31:34 -04:00
parent 5de8244b4c
commit 9475606375

View File

@@ -47,6 +47,12 @@ sed --in-place 's/^access_provider = ad/access_provider = simple\nsimple_allow_g
systemctl restart sssd
# set the sudoers.d file for the server admins
echo "## ${netbiosname} Admins ##" > /etc/sudoers.d/${netbiosname}
echo "# Allow members of ${netbiosname}\Server Admins group sudo access" >> /etc/sudoers.d/${netbiosname}
echo "%Server\ Admins ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/${netbiosname}
cat << EOF > /etc/sudoers.d/${netbiosname}
## ${netbiosname} Admins ##
# Allow members of ${netbiosname}\Domain Admins group sudo access
%Domain\ Admins ALL=(ALL:ALL) ALL
# Allow members of ${netbiosname}\Server Admins group sudo access
%Server\ Admins ALL=(ALL:ALL) ALL
EOF