SUDO permission to install RPM

General support questions
Post Reply
z_haseeb
Posts: 102
Joined: 2009/12/31 07:58:30

SUDO permission to install RPM

Post by z_haseeb » 2024/02/13 13:46:35

is it possible that we can allow a non-root user to install a specific package. for example I only want to allow a sudo permission to a non-root user to install redis-7.2.4-1.el8.remi.x86_64.rpm

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: SUDO permission to install RPM

Post by jlehtone » 2024/02/13 14:15:39

Would it not be easier to simply install the package?

User avatar
TrevorH
Site Admin
Posts: 33223
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: SUDO permission to install RPM

Post by TrevorH » 2024/02/13 15:12:38

I'd agree. But to answer the original question, yes, but then that means that user could conceivably create and package their own nefarious package called that and then use sudo to install it. So a sudo entry like

dodgyuser ALL=(ALL) yum install redis-7.2.4-1.el8.remi.x86_64.rpm

means they could then go off and create their own package named that and use sudo to install it. The package could then give them root access.

A safer way would be to install the remi repo and then allow the user access to

dodgyuser ALL=(ALL) yum install redis, yum update redis
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply