You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nopassword sudo on CentOS 7 in docker 20.10.18
## How the problem appears
> sudo: timed out reading password
## Known prerequisites to reproduce the problem
* Ubuntu host system.
* Docker 20.10.18 or newer.
* A build against CentOS 7 (`OS=el DIST=7 /path/to/packpack`).
I'm not sure, but maybe we also need an `rpm/prebuild.sh` script that
invokes `sudo`.
## Summary of investigation
In given circumstances the following sudoers line doesn't work as
expected:
```
%wheel ALL=(ALL) NOPASSWD: ALL
```
## Brief explanation of the fix
Add current user into sudoers file:
```
<..user..> ALL=(ALL) NOPASSWD: ALL
```
`printf` is used instead of `echo` for portability between `bash` and
`dash`.
## Details
A more detailed investigation of the problem and an explanation of the
fix could be found in the linked issue.
Fixes#145
0 commit comments