Syntax error in /etc/sudoers.d/file

Tony Arnold tony.arnold at manchester.ac.uk
Fri May 14 08:04:26 UTC 2021


Hi Bob.


On Thu, 2021-05-13 at 20:08 -0700, Bob wrote:
> In Ubuntu 20.10 I had added a line
> 
> robert ALL=NOPASSWORD: /bin/mount
> 
> in the file /etc/sudoers.  The upgrade to Ubuntu 21.04 overrode that
> line.  I
> now see that was the wrong place for the change I wanted to do.  So I
> have now
> created a new file /etc/sudoers.d/robert and entered the same
> line.  Now I am
> getting a syntax error.
> 
> /etc/sudoers.d/robert:1:34: syntax error
> robert ALL=NOPASSWORD: /bin/mount
>                                  ^
> 
> With a fixed font the ^ is the space after the end of the line.

Random thought but is there a newline character at the end of that
line?

Regards,
Tony.
-- 
Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT Services | Office 1, Kilburn Building | The University of Manchester | Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4054 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20210514/823c1913/attachment.bin>


More information about the ubuntu-users mailing list