Score:0

In what line of sudoers do I put this?

vc flag
%newgroup, !newuser ALL=(ALL:ALL)NOPASSWD:ALL, !/usr/sbin/iptables

I have read that it is put at the end, but I am not sure about it

enter image description here

Pilot6 avatar
cn flag
Are you using Ubuntu? What are you trying to do?
Dabro avatar
vc flag
Yes, I want to make a new group less than one user of that group can execute any command through privilege elevation, except for the command that allows changing the firewall rules and without entering a password.
Dabro avatar
vc flag
i wantto put that command on /etc/sudoers.tmp but i dont know exactlyt in which line
Pilot6 avatar
cn flag
Which Ubuntu release you are using?
Dabro avatar
vc flag
the version is 20.04.5
24601 avatar
in flag
https://linuxize.com/post/how-to-add-user-to-sudoers-in-ubuntu/
vidarlo avatar
om flag
Note that allowing all *and* disallowing one command doesn't really work; any user can freely run `sudo /bin/bash` and happily run `iptables` from their shiny new root shell.
Score:0
sa flag

Put a new line containing %newgroup, !newuser ALL=(ALL:ALL)NOPASSWD:ALL, !/usr/sbin/iptables at the end of /etc/sudoers.tmp after the line that contains this comment:

#includedir /etc/sudoers.d
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.