Disallow sudo
without password
This commit is contained in:
parent
b246d1bd22
commit
555c2eb3b7
1 changed files with 2 additions and 1 deletions
|
@ -3,5 +3,6 @@ if [ ! "$UID" -eq 0 ]
|
||||||
then
|
then
|
||||||
sudo bash "$BASH_SOURCE";
|
sudo bash "$BASH_SOURCE";
|
||||||
else
|
else
|
||||||
sed -i "s/^# \(%wheel \)/\1/" /etc/sudoers;
|
wheelPattern="^# \(%wheel \)";
|
||||||
|
sed -i "/$wheelPattern/{ /NOPASSWD/{ b; }; s/$wheelPattern/\1/; }" /etc/sudoers;
|
||||||
fi;
|
fi;
|
||||||
|
|
Loading…
Reference in a new issue