Hello All,
I am looking if Ansible supports rootsh for privilege escalation. I have tried all possible ways but i am not successful yet.
Documenation: https://linux.die.net/man/1/rootsh
If there is no module/plugin present for rootsh : My question is can i create a new module or plugin for rootsh for my use? I would like to know which source code files i need to modify for rootsh privilege escalation.
Here is my sudoer file:
Allow root to run any commands anywhere
root ALL=(ALL) ALL
poweruser ALL=(ALL) ALL
normaluser ALL=(root) /usr/bin/rootsh /bin/su - poweruser
I would like to ssh using normaluser and then change the user to poweruser and run all sudo commands.
normal user only can run: sudo /usr/bin/rootsh /bin/su - poweruser
it asks for password to change to poweruser
-Sam