[sudo-users] Installing Packages as Another User With Sudo

Bram Mertens mertensb.mazda at gmail.com
Sat Jul 14 01:31:15 MDT 2018


Ricardo,

There is no need to install "via" another user.
If you want to allow user ganttrec to run apt you should just add
something like:
granttrec home = (root) /usr/bin/apt, (root) /usr/bin/aptitude

HTH

Bram
On Fri, Jul 13, 2018 at 7:31 PM Ricardo Grant <rgrant at laurentian.ca> wrote:
>
> I have been trying and failing to set up the sudoers file so that I can run
> apt/dpkg/etc as another user without sudo (root) access. Here is a snippet:
>
> # Restrict the user "packager" to only installing packages on this machine
> packager home = NOPASSWD: (root) /usr/bin/apt, (root) /usr/bin/aptitude,
> (root) /usr/bin/dpkg
>
> # Allow users to install packages via "packager"
> granttrec home = (packager) /usr/bin/apt, (packager) /usr/bin/aptitude
>
> The user packager was created as a system user and belongs to nogroup, I
> tried adding thi user to the sudo group but no effect, the command I am
> trying to run is:
>
>
> sudo -u packager sudo aptitude install ...
>
> Any Ideas?
>
> TIA
> ____________________________________________________________
> sudo-users mailing list <sudo-users at sudo.ws>
> For list information, options, or to unsubscribe, visit:
> https://www.sudo.ws/mailman/listinfo/sudo-users


More information about the sudo-users mailing list