I have a syntax wrangling problem with sudo
that may not be solvable.
I know I know, OpenBSD's new doas
is better than sudo
, but it is not available on CentOS 7 or Rocky 8. So we're stuck with sudo
for a while, girls and guys.
If I add the following line with visudo -f /etc/sudoers.d/custom
it works, and visudo
doesn't complain about it:
%group@domain.com *=(root) NOPASSWD: /usr/bin/mount -a
However, if I then add the following:
%group@domain.com *=(root) NOPASSWD: /usr/bin/mount -o remount,rw nfs-server.domain.com:/nfs3 /mnt/nfs3
Then visudo
consistently rejects it with:
syntax error near line 41
(indeed it is line 41). I have tried various alternations of the above.
Any ideas why, or what would work?
Thank you