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.
1 Answer
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– Virtual Ghost2019-07-30 06:49:20 +00:00Commented Jul 30, 2019 at 6:49
-
You can type
man sudoat 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– RalfFriedl2019-07-31 05:45:37 +00:00Commented Jul 31, 2019 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 readmeVirtual Ghost– Virtual Ghost2019-08-06 06:58:40 +00:00Commented Aug 6, 2019 at 6:58
myusername ALL=(ALL) NOPASSWD: /path/to/executable1, /path/to/executable2, /path/to/executable3, ...