IPA: psql command not working with sudo.

Solution Verified - Updated -

Issue

  • psql command configured with double quotes in IPA not working with sudo. Failing with error.
$ sudo -i -u dev_user psql -c "SELECT NOW()"
[sudo] password for dev_user:
Sorry, user dev_user is not allowed to execute '/bin/bash -c psql -c SELECT\ NOW()' as tuser on server1.example.test.
  • psql command configured with double quotes in /etc/sudoers not working with sudo

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • IPA 4.x
  • Sudo

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