Skip to content

Commit

Permalink
check if folder /etc/sudoers.d/ exists
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Nov 18, 2024
1 parent 22736b0 commit 6f84ff2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions usr/bin/passwordless-root
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ if [ ! "$(id -u)" = "0" ]; then
exit 1
fi

if ! test -d "/etc/sudoers.d/" ; then
true "$0: ERROR: Folder /etc/sudoers.d/ does not exist! Is sudo installed?"
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 Down

0 comments on commit 6f84ff2

Please sign in to comment.