-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable become root using rootsh (wrapper for shells) #49625
Comments
Files identified in the description:
If these files are inaccurate, please update the |
afaik, rootsh is not privilege escalation, just a 'logging shell', you can set the default executable to enforce using it https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-executable |
Files identified in the description: If these files are inaccurate, please update the |
I was able to get this working by changing these lines in my ansible.cfg: become_method=doas It also worked with just a "sudo rootsh" |
Hello @pborowicz @bcoca @sivel I am trying to accomplish similar task, in my case I only have access as root with below command I do not have doas installed in my server so I tried in the followig ways to gain access as root
And
But it does not work, all the time I receive from server that I am not allowed to run commands as sudo, so do you have some suggestion? |
Thank you very much for your submission to Ansible. It means a lot to us that you've taken time to contribute. Unfortunately, this issue has been open for some time while waiting for a contributor to take it up but there does not seem to have been anyone that did so. So we are going to close this issue to clear up the queues and make it easier for contributors to browse possible implementation targets. However, we're absolutely always up for discussion. Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time. If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below: In the future, sometimes starting a discussion on the development list prior to proposing or implementing a feature can make getting things included a little easier, but it's not always necessary. Thank you once again for this and your interest in Ansible! |
SUMMARY
Unable to become a root where the environment uses rootsh (wrapper shell) method to gain root access.
ISSUE TYPE
Allow multiple methods or custom methods to gain the root access
COMPONENT NAME
become
become_flags
ADDITIONAL INFORMATION
We are gaining the root access using the following method.
# sudo -H rootsh
When we need to run command without gaining the root shell ,
# sudo -H rootsh -i -u root -- ls -l
The text was updated successfully, but these errors were encountered: