/etc/sudoers.d/99-snapd.conf is ignored

Bug #1901669 reported by Denilson Sá
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

snapd package installs a "/etc/sudoers.d/99-snapd.conf" file.

However, for some (undocumented or poorly documented) reason, files with dots are ignored by sudo. Thus, "/etc/sudoers.d/99-snapd.conf" is ignored, but "/etc/sudoers.d/99-snapd" would work.

See: https://askubuntu.com/a/1156564

Impact:
There is little to no impact to snap usage. HOWEVER, there is a high impact on people trying to create their own sudoers files into /etc/sudoers.d/. People will see that file in there and will try to follow the same naming convention (00-foobar.conf), only to waste a lot of time scratching their heads to figure out why it doesn't work.

Proposed solution:
Rename that file, removing the dot from the filename.

description: updated
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

This was fixed in snapd 2.46. The file is no longer shipped by the snapd package. Does it still exist in your system?

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Oliver Grawert (ogra) wrote :

/etc/sudoers.d/README pretty clearly states:

# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in '~' or contain a '.' character.
#

i wouldn't call that poorly documented (unless someone deletes the README file) ...

Revision history for this message
Denilson Sá (denilsonsa) wrote :

You're right, I was in a hurry, and I still haven't updated to Ubuntu 20.x; so this bug is likely obsolete.

I had indeed read the README file, I remember the "~" but somehow missed ".". I guess the frustration of spending a lot of time with something trivial made me overlook some details. Sorry for the noise, thanks for your responses!

Changed in snapd (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Dmitry Lapshin (lapshin-dv) wrote :

Hi! Today, on Ubuntu 20.10, I still have this file installed as part of snapd version 2.48.3+20.10. Reopen & fix, please.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.