Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am creating a test system that will be run by others. It will have some kernel mods, and some of the default software in /usr/bin will be replaced. Because of this, I want to prevent the users from doing "sudo apt-get update" or "sudo apt-get install". These systems will not have any valuable data, and will mostly be behind corporate firewalls, and thus it is safe to completely punt on security-based releases.

FWIW, moving apt-* and dpkg* to /usr/dontusethese does not work because some other processes like (gag) MOTD updating relies on them being in /usr/bin and whine if they are not there.

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

Just configure /etc/sudoers appropriately so that only authorized users can run apt-get.

share|improve this answer
1  
Doh, or that would work just as well as my response. –  peelman Oct 14 '10 at 18:44
2  
Prohibiting users from doing an action is a better solution than masking the update action by removing the repositories. –  Chris Oct 14 '10 at 18:55
1  
To close the loop, since people like recipes, here is what works well: "adminuser ALL = NOPASSWD: ALL, !/usr/bin/apt*, !/usr/bin/dpkg*" –  Paul Hoffman Oct 16 '10 at 16:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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