# ansible become user failing due to shell execution restrictions

**URL:** <https://forum.ansible.com/t/ansible-become-user-failing-due-to-shell-execution-restrictions/34946>\
**Category:** Ansible Project\
**Created:** [April 8, 2021, 7:46pm UTC](https://forum.ansible.com/t/ansible-become-user-failing-due-to-shell-execution-restrictions/34946 "2021-04-08T19:46:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [April 8, 2021, 7:46pm UTC](https://forum.ansible.com/t/ansible-become-user-failing-due-to-shell-execution-restrictions/34946/1 "2021-04-08T19:46:25Z")

</div>

I am running into an interesting issue, and wondered if anyone has hit the same thing as I have. We have our sudo configs locked down pretty tight, and don’t allow users to do execute a shell directly using sudo. So, basically, things like sudo /bin/sh are not permitted. I found a 5 year old stacktrace article with a workaround, and I am not particularly fond of the suggestion, which was to make a copy of /bin/sh as a different filename, then tell ansible to use that via the ansible config. ( [https://stackoverflow.com/questions/33529850/ansible-have-sudo-but-no-root](https://stackoverflow.com/questions/33529850/ansible-have-sudo-but-no-root))

Has anyone seen this before, and if so, I am curious as to what your workaround was.

–john
