I need to specify the prefix of the rpms that a specific user can install on a CentOS 7 server. For example, let's say that I have:
- my_package_foo.rpm
- my_package_boo.rpm
I thought that I could add this:
my_user ALL=NOPASSWD: /bin/rpm* my_package*
But it's not working.
I also tried variations, like:
my_user ALL=NOPASSWD: /bin/rpm my_package*
Finally I tried like below, but this allows me to install any rpm, what I don't want.
my_user ALL=NOPASSWD: /bin/rpm