Skip to content

Commit

Permalink
check if folder /etc/sudoers.d/ is writeable
Browse files Browse the repository at this point in the history
  • Loading branch information
adrelanos committed Nov 18, 2024
1 parent 6f84ff2 commit e2b6c54
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 @@ -31,6 +31,11 @@ if ! test -d "/etc/sudoers.d/" ; then
exit 1
fi

if ! test -w "/etc/sudoers.d/" ; then
true "$0: ERROR: Folder /etc/sudoers.d/ is not writable!"
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 e2b6c54

Please sign in to comment.