Syntax error in /etc/sudoers.d/file

Bob ubuntu-qygzanxc at listemail.net
Fri May 14 19:09:47 UTC 2021


** Reply to message from Colin Law <clanlaw at gmail.com> on Fri, 14 May 2021
09:32:04 +0100

> On Fri, 14 May 2021 at 04:11, Bob <ubuntu-qygzanxc at listemail.net> wrote:
> >
> > In Ubuntu 20.10 I had added a line
> >
> > robert ALL=NOPASSWORD: /bin/mount
> 
> It should be NOPASSWD
> though I don't know whether the full word is supposed to work.

What I had written down was the full word which may have worked in 20.10.

NOPASSWD does work in 21.04

Thanks Colin.


> Colin
> 
> >
> > 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


A liberal is someone who feels a great debt to his fellow man, which debt he proposes to pay off with your money.  -- G. Gordon Liddy




More information about the ubuntu-users mailing list