Skip to content

Commit

Permalink
FIX: passwordless sudo detection (#1487)
Browse files Browse the repository at this point in the history
- The passwordless sudo check with "sudo -l" fails
- Check with "sudo hostname" works as expected

fixes #1473
credits @very-common
  • Loading branch information
daverolo authored Oct 11, 2023
1 parent 1cdd166 commit dbb90cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion launcher/src/backend/NodeConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class NodeConnection {
exit 0
fi
# Check if users needs a password for sudo
msg=$(sudo -l 2>&1)
msg=$(sudo hostname 2>&1)
if [[ "$msg" == *"sudo: a password is required"* ]]; then
echo "FAIL: user can not sudo without password!"
exit 1
Expand Down

0 comments on commit dbb90cb

Please sign in to comment.