rpm, yum, dnf does not work with sudo NOEXEC

Solution Unverified - Updated -

Issue

When using rpm, yum or dnf via sudo there are errors seen.

$ sudo yum erase sendmail

[snip]
error: failed to exec scriptlet interpreter /bin/sh: Permission denied
warning: %transfiletriggerun(systemd-239-68.el8_7.4.x86_64) scriptlet failed, exit status 127

Error in <unknown> scriptlet in rpm package sendmail
  Running scriptlet: sendmail-8.15.2-34.el8.x86_64                                                                                                                                                             1/3 
error: failed to exec scriptlet interpreter /bin/sh: Permission denied
error: %preun(sendmail-8.15.2-34.el8.x86_64) scriptlet failed, exit status 127

Error in PREUN scriptlet in rpm package sendmail
  Running scriptlet: cyrus-sasl-2.1.27-6.el8_5.x86_64                                                                                                                                                          2/3 
error: sendmail-8.15.2-34.el8.x86_64: erase failed
error: failed to exec scriptlet interpreter /bin/sh: Permission denied
error: %preun(cyrus-sasl-2.1.27-6.el8_5.x86_64) scriptlet failed, exit status 127

Error in PREUN scriptlet in rpm package cyrus-sasl
  Erasing          : procmail-3.22-47.el8.x86_64                                                                                                                                                               3/3 
error: cyrus-sasl-2.1.27-6.el8_5.x86_64: erase failed

Environment

  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content