2023-04-03 09:00:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
if [ ! "$UID" -eq 0 ]
|
|
|
|
then
|
|
|
|
sudo bash "$BASH_SOURCE";
|
|
|
|
else
|
2023-04-04 21:43:56 +00:00
|
|
|
wheelPattern="^# \(%wheel \)";
|
|
|
|
sed -i "/$wheelPattern/{ /NOPASSWD/{ b; }; s/$wheelPattern/\1/; }" /etc/sudoers;
|
2023-04-03 09:00:11 +00:00
|
|
|
fi;
|