Why am I Getting the Error “Sorry, user 'user1' is not allowed to execute" when using dzdo as become_method?

Solution Verified - Updated -


  • We are using dzdo as become_method and need to switch the user in playbooks to perform a few tasks, but we are getting errors while doing so. The following is a sample playbook:
- hosts: tests
  become_method: dzdo
  become: yes
    - name: test
      shell: date
      become_user: test1
  • Getting below Error :
 <example> (1, "Sorry, user test is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-xildtaheyzakdjqaagujyohooamdmpux; /usr/bin/python /tmp/ansible-tmp-1513597610.16-44940030388307/command.py' as test1 on xyz.example.com.\r\n",


  • Red Hat Ansible Engine

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