Put simply, Whenever somebody logs onto the family computer that I manage, I get bugged about updates and "could you install x thing that I saw in the store" and such. How would I enable all users to run flatpak, snap, and plasma-discover without root? All questions about this that I have seen previously seen only cover running one command without root access. How to run a specific program as root without a password prompt? does not answer my question as it addresses allowing a user to run a single program without root access.

  • program(S) plural – Virtual Ghost Jul 20 '19 at 0:16
  • Then just add the other commands into the list: myusername ALL=(ALL) NOPASSWD: /path/to/executable1, /path/to/executable2, /path/to/executable3, ... – Jeff Schaller Jul 21 '19 at 13:09
  • sorry for the late reply, but could i add a group with all of these commands enabled, rather than adding each permission like 5 times for different people? – Virtual Ghost Jul 30 '19 at 6:48
  • Yes; see unix.stackexchange.com/a/168309/117549 for one example. – Jeff Schaller Jul 30 '19 at 19:49

You can use sudo for that. You can specify what users are allowed to run commands, what commands can be executed, and whether to ask for a password of not. See the manual for details.

If you don't want to that users have to type sudo in front of the commands, create aliases in /etc/profile for the commands that will run the commands with sudo.

  • Could you link me to the manual/ man page? – Virtual Ghost Jul 30 '19 at 6:49
  • You can type man sudo at the command prompt, or you can type "man sudo" into Google.If you can't find a man page yourself, you shouldn't run programs as root. – RalfFriedl Jul 31 '19 at 5:45
  • been linuxing for a while, and nobody, NOBODY, has mentioned man as a command, making me think it was another name for a readme – Virtual Ghost Aug 6 '19 at 6:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.