How restrict APT/synaptic to list of packages?

If it doesn't relate to Debian, but you still want to share it, please do it here

How restrict APT/synaptic to list of packages?

Postby bester69 » 2019-06-15 02:36

Hi,

I was wondering, How do you do to restrict ,prevent differnt tasks/possibilies for a non root user ..

For example, I would like to know.:
1-A User can only install/remove some packages-....He can remove /install any package but some few of them, which are blocked by root to the regular user.
Here, I tried with sudoers allowing only to run apt-get to that user.: user ALL=(ALL:ALL) /usr/bin/apt-get , and using apt-mark hold to trying to block some packages to sudoers user, but apt-mark(root) doesnt prevent apt-get(sudo) from removing packages.. so I dont know how do you do to get it done. :roll:

Any help, would be really appreciate it. :roll:
bester69 wrote:You wont change my mind when I know Im right, Im not an ...
User avatar
bester69
 
Posts: 1494
Joined: 2015-04-02 13:15

Re: How restrict APT/synaptic to list of packages?

Postby pylkko » 2019-06-15 20:04

Never have I done this and most systems that I have known with restricttions on installing work so that non privileged userz ask an admin to install what they need.

However, wouldn't it work if there were a systemd path which monitors user input. First you would have a whitelist of programs that users are allowed to install. Then a service that compares the changes to the path made by the user to the whitelist and calls apt.

Setup a installer.path to monitor a path of your choice for new file names. Then have it launch a comparison service tnch o check the whitelist and either install or reject. The path could work so that when a non-privileged user wants to install a package,they touch a file of the same name as the package into the monitored path. Systemd will immediately notice the change and the name, launch a service or script to install.

There might be more elegant way to do this,but I think this should work.
User avatar
pylkko
 
Posts: 1586
Joined: 2014-11-06 19:02


Return to Offtopic

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable