ansible become user failing due to shell execution restrictions

8 views
Skip to first unread message

John Petro

unread,
Apr 8, 2021, 3:46:50 PM4/8/21
to ansible...@googlegroups.com
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)

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

--john
Reply all
Reply to author
Forward
0 new messages