Score:0

suoders.d/ not working on ubuntu server 16 to 22.04

md flag

Long story short, I'm trying to enable NOPASSWD for some user by creataing a file called user inside /etc/sudoers.d/ folder.

The file has the right permissions 0440 and the content seems alright user ALL=(ALL:ALL) NOPASSWD: ALL

When I run visudo -c to check whether or not everything is alright, it doesn't even print the files inside suoders.d.

It always says :

/etc/sudoers: parsed OK
/etc/sudoers.d/README: parsed OK

Even tho i don't have any README file inside this folder...

I have this issue on 4 VMs running Ubuntu 16.04 to 22.04. I tried on my "Desktop" version and it seems that I canno't replicate this issue, i'm really going crazy.

If you have any idea...

Thanks !

hr flag
The default name is `/etc/**sudo**ers.d/` not `/etc/**suod**ers.d/` - please check your spelling - including that of the `@includedir` directives in your `/etc/sudoers` file(s)
Lolo Giordano avatar
md flag
It was a typo from my end. Also, the directive is `#includedir` not `@includedir` if it makes any difference.
hr flag
`#includedir` is the older notation (pre-1.9.1) but is supported for backward compatibility
Lolo Giordano avatar
md flag
I don't really know what's the issue. I tried to run `visudo -cf /etc/sudoers.d/user` and it does print that the parsing is right. But running it with only `-c` doesn't show any file inside the `suoders.d` folder. I tried to add the line directly to the `/etc/suoders` file and it is working but this is not really what I'm trying to achieve...
hr flag
Is the file name literally `user`? or is it something else?
Lolo Giordano avatar
md flag
this is something else, "ansible" to be more precise. I tried to add another but it keeps returning the same output with the "README" that shouldn't be displayed if i'm not mistaken ?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.