Sudo in codeready workspaces containers

Latest response

Hello,
I need sudo access in developer container, in codeready workspaces. Whenever I try to run a command with sudo, I always get the following:

sudo: PERM_SUDOERS: setresuid(-1, 1, -1): Operation not permitted
sudo: no valid sudoers sources found, quitting
sudo: setresuid() [0, 0, 0] -> [1000860000, -1, -1]: Operation not permitted
sudo: error initializing audit plugin sudoers_audit

So, what can I do in order to be able to run scripts with sudo, in the dev container?

Responses

anyone ?

Hi,

Minor issue add a name to your profile is relevant to most of us.

Regards,

Jan Gerrit

Hi,

Did you check KB article 3916301?

Regards,

Jan Gerrit Kootstra

Hi, I tried to follow the instructions in the link you provided, but I don't have rights to modify the /etc/nsswitch.conf file. I imagine I have to log in as a root user, but am not sure how to do that. I'm running CodeReady Workspaces using the CodeReady Workspaces Operator in Openshift Container Platform.

So it might be better to go to Support Cases to ask support to help you.

Mr "not relevant" (unique profile name choice)

Can you attempt to coordinate with the person or office who has the root password to attempt to possibly make the change? If you have a legitimate need, they ought to accommodate your requirement.

The solution I found is the identical one my esteemed collogue Jan Gerrit mentioned.

Regards,
RJ