Syntax error in /etc/sudoers.d/file

Bob ubuntu-qygzanxc at listemail.net
Fri May 14 03:08:59 UTC 2021


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.

This line worked in 20.10 but not in 21.04.  I have checked the documentation
and do not see a problem with the line I entered.  Anyone know what I have done
wrong.

-- 
Robert Blair


Beer is proof that God loves us and wants us to be happy.  -- Benjamin Franklin




More information about the ubuntu-users mailing list