0

How to restrict the user to install packages in linux

I have given the sudo access to one of my user. but i need to restrict only the package installation i.e to block only the apt-get install command. Is it possible...??

Linux Sudo Add a comment
nathan
asked Mar 02 2017

Answer

0

Yes its possible.

Just add the below line in sudoers file. (/etc/sudoers)

user1   ALL = ! /usr/bin/apt-get

This line indicates that the particular user can able to run all commands except apt-get command. So User1 will be restricted to use that commands as you required.

Add a comment
jagannatharumugam
asked Mar 09 2017
edited Oct 05 2018
Post your Answer
0

Thanks... for the best idea...!!!

Add a comment
nathan
asked Mar 09 2017
edited Oct 05 2018
Post your Answer