Skip to content

Commit

Permalink
sudoers/domainadmins bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
duygupotur committed Mar 22, 2022
1 parent f555b61 commit 7c92f82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/usr/local/bin/smb-create-domain
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ sed -i "s/#PermitRootLogin prohibit-password$/PermitRootLogin yes/g" /etc/ssh/ss
# Add domain admins group to sudoers
#grep -E \"%domain\x20admins\\s+ALL=(ALL)\\s+ALL\" /etc/sudoers.d/domainadmins || echo \"%domain\x20admins ALL=(ALL) ALL\" >> /etc/sudoers.d/domainadmins

echo "%domain\x20admins ALL=\(ALL\) ALL" >> /etc/sudoers.d/domainadmins

(test -f "/etc/sudoers.d/domainadmins" && grep -q '%domain\\x20admins' /etc/sudoers.d/domainadmins ) || echo "%domain\x20admins ALL=(ALL) ALL" >> /etc/sudoers.d/domainadmins
# Restart services
systemctl restart sshd.service
systemctl daemon-reload
Expand Down

0 comments on commit 7c92f82

Please sign in to comment.