Repository navigation
fix(build): skip the sudo password prompt where sudo runs unprompted - #158
Merged
Merged
Conversation
`sudo -v` asks for a password unless every sudoers entry is NOPASSWD. The test stations grant NOPASSWD: ALL beside a password-gated entry, so every command the scripts run needs no password, yet setup, build and flash stopped at `sudo -v` and could not run unattended over SSH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setup.sh,build.sh,flash.shandgenerate_flash_package.shno longer stop for a sudo password on a host where sudo already runs without one.Problem
The scripts prime sudo with
sudo -v, which asks for a password unless every sudoers entry for the user is NOPASSWD. The test stations grantNOPASSWD: ALLbeside a password-gated entry. Every command the scripts run there needs no password, butsudo -vstill asks, so none of them can run unattended over SSH.Solution
Run
sudo -vonly whensudo -n truefails.The same commit is on #157, which needed it to build on a station.