9 lines
198 B
Bash
Executable file
9 lines
198 B
Bash
Executable file
#!/bin/bash
|
|
if [ ! "$UID" -eq 0 ]
|
|
then
|
|
sudo bash "$BASH_SOURCE";
|
|
else
|
|
wheelPattern="^# \(%wheel \)";
|
|
sed -i "/$wheelPattern/{ /NOPASSWD/{ b; }; s/$wheelPattern/\1/; }" /etc/sudoers;
|
|
fi;
|