Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Nov 18, 2024
1 parent 1aef265 commit 22736b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions usr/bin/passwordless-root
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ command -v sponge >/dev/null
## sudo configuration syntax check and atomic writes.
command -v visudo >/dev/null

if [ ! "$(id -u)" = "0" ]; then
true "$0: ERROR: This program must be run as root!"
exit 1
fi

passwordless_sudo_non_qubes() {
echo "user ALL=(ALL:ALL) NOPASSWD:ALL" | EDITOR=tee visudo -f /etc/sudoers.d/nopassword >/dev/null
true "\
Expand All @@ -40,11 +45,6 @@ passwordless_sudo_qubes() {
exit 1
fi

if [ ! "$(id -u)" = "0" ]; then
true "$0: ERROR: This program must be run as root!"
exit 1
fi

true "$0 INFO: Creating file...: /etc/sudoers.d/nopassword"

## Temporary passwordless sudo until reboot.
Expand Down

0 comments on commit 22736b0

Please sign in to comment.