-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
macos-13 fails with sudo: a terminal is required to read the password
#7987
Comments
Hello @JarLob . Thanks for your report. We will take a look. |
@JarLob , I added your steps to workflow, it runs on macos-13 without any issue https://github.com/ilia-shipitsin/sudo/actions/runs/5693244777/job/15431908696 |
@JarLob , I'm closing this issue (cannot repro using provided steps). |
I have minimized https://github.com/GitHubSecurityLab/actions-permissions/actions/runs/5678918868/job/15390694453 to on:
workflow_dispatch:
jobs:
job1:
strategy:
fail-fast: false
matrix:
os:
- macos-13
- macos-latest
- macos-11
runs-on: ${{ matrix.os }}
steps:
- run: |
sudo sysadminctl -addUser myuser -admin
sudo -u myuser -H bash -e -c "id" Please see https://github.com/GitHubSecurityLab/actions-permissions/actions/runs/5856845682/job/15877437623 |
I added couple of lines to your repro https://github.com/ilia-shipitsin/gh7987/blob/main/.github/workflows/blank.yml as we can see
looks like sudo group handling has changed in macos-13 |
interesting, seems we do not have |
Isn't the difference between mac13 and others that it doesn't have |
as a workaround, you can add we'll add it to newly generated image (release cycle for macos-13 is not very frequent, I'd say 2-4 weeks usually between releasing updated image) |
Thanks. No worries. As you said a workaround is available, but the difference in mac13 would break things unexpectedly, so I have reported. |
I'm running into this issue when using the @ilia-shipitsin Is there a reason why #8086 was not merged? |
Description
The run fails with
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
The script does:
It works on
macos-11
andmacos-12
most probably because/etc/sudoers
used to containrunner ALL=(ALL) NOPASSWD: ALL
, but not inmacos-13
Platforms affected
Runner images affected
Image version and build link
20230611.2
Is it regression?
yes, macos-12, https://github.com/GitHubSecurityLab/actions-permissions/actions/runs/5678918868/job/15390694634
Expected behavior
No error.
Actual behavior
fails with
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Repro steps
sudo sysadminctl -addUser mitmproxyuser -admin
sudo cp mitm_plugin.py /Users/mitmproxyuser/mitm_plugin.py
see https://github.com/GitHubSecurityLab/actions-permissions/actions/runs/5678918868/job/15390694453
The text was updated successfully, but these errors were encountered: