-
Notifications
You must be signed in to change notification settings - Fork 586
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
admin user required on self-hosted runner #760
Comments
Hello @daiyam. Thank you for your report. We'll take a look on it. |
@dmitry-shibanov Do you have an update on this? Also getting for macos14 installing 3.12 |
Hey @dmitry-shibanov - Can we take another look at this and make it a priority? |
Ideally this would just be relegated to an unprivileged addition to PATH instead of requiring the user to be a sudoer/admin. Stranger still that the user must be named |
I am also getting this error macOS 14 installing Python 3.11. |
Currently the workarounds are:
You could add that for just the runner user of course and not the entire admin group. |
My user is runner and cannot be installed normally.
|
|
I'm encountering the same issue. When trying to install python with the setup-python@v5 action on a macstadium orka runner I get this error... I go through the setup process detailed in the docs here... Which looks like this in the pipeline... Fully stuck here. Outside of disabling the password requirement for sudo and regenerating the image we're using, I'm unsure how to solve it. Any help would be appreciated. |
Workaround is to set sudoers to NOPASSWD to avoid the prompt for your automation user. Insecure and bad, but it seems to work. |
This is a bigger security issue than a workaround. |
Hello @daiyam, When using self-hosted runners, it's important to ensure that all necessary dependencies, including Python, are properly installed and configured to avoid issues like the ""sudo: installer: command not found"" error. In your case, the issue arises because the install script requires the user starting the runner to have admin (sudo) privileges, which is necessary for certain operations like installing dependencies. Here are a few steps to address this:
Self-hosted runners are fully customizable to meet your specific environment needs. For more information on setting up and troubleshooting self-hosted runners, please refer to the Using self-hosted runners documentation and Using setup-python with a self-hosted runner |
The only command that seems to be executed with You can override the default In our case, the command in question is Execute
|
TLDR, run this once after configuring visudo as mentioned above:
I can confirm that the action works as intended with changes to ![]() I guess this could be included in the documentation @mahabaleshwars @priya-kinthali @aparnajyothi-y @HarithaVattikuti |
Hello @vanyasem, While allowing sudo installer to run without a password might be convenient, it poses several security risks. These risks are primarily due to the potential for privilege escalation, malicious package installation, and lack of accountability. For these reasons, this approach is not recommended, and the documentation cannot be updated to reflect this workaround. |
@mahabaleshwars I do agree with your point. However, allowing
Originally posted by @plink-plonk-will in #760 (comment) The idea behind my suggestion to mention it in the docs is to highlight the security implications of the solution, and to guide users to the least priveledged option. The solution to add the entire user as a NOPASSWD sudoers gets mentioned a lot, and it's being used in the wild, despite it being a massive security vulnerability. Linking to a least drastic option could be useful imo. But if you feel that it doesn't belong in the docs, I'm fine with that. Thanks for the reply, I appreciate the work you're doing. |
Hello @daiyam, Could you kindly confirm if the feedback provided has resolved your issue? |
I haven't tested it since |
Hello @daiyam, |
Description:
On a self-hosted runner, the install script requires that the user starting the runner to be an admin (due to the
sudo
commands).Action version:
4
Platform:
Runner type:
Tools version:
3.11.6
Expected behavior:
Successful install
Actual behavior:
Asking for a password and fails due to not running as an admin user
The text was updated successfully, but these errors were encountered: