Syntax error in /etc/sudoers.d/file
Tom H
tomh0665 at gmail.com
Fri May 14 08:57:44 UTC 2021
On Fri, May 14, 2021 at 5:11 AM Bob <ubuntu-qygzanxc at listemail.net>
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.
>
> 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.
You have to leave a space between "=" and "NOPASSWORD:".
More information about the ubuntu-users
mailing list