APT-GET – Run apt-get Without Sudo

multiple userspermissionsrootsudo

This might be a very naive question, but I wanted to know how I could give multiple users access to a single computer without making them root users. How would I give them limitted sudo access such that they could still issue commands like

sudo apt-get install epstopdf

I imagine this could be an incredibly stupid question as once root user access is given, they could do whatever they want. Therefore, is there any way around this? I am open to suggestions

Best Answer

Open a terminal and type sudo visudo. At the end of the file (really the last line in it) type %yourusername% ALL=NOPASSWD: /usr/bin/apt-get install where %yourusername% is replaced by your username.

After that you wont be prompted for a password to use sudo apt-get install anymore but please understand this is a very risky solution, there is a reason why you need to type a password for some commands, the use of these commands without password can leave your system open for some dangers. Use with caution.