commit 605acb02f6c47c2c38c565cbdfadf1503ad8cc5c parent 73782c9db22e09b8ac7b60cf5a08d042d77e1220 Author: awy <awy@awy.one> Date: Thu, 20 Mar 2025 19:36:29 +0300 sudo Diffstat:
M | rice.sh | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rice.sh b/rice.sh @@ -15,7 +15,8 @@ if [ -x "$(command -v doas)" ]; then evalcommand="doas -u $PERMUSER" else evalcommand="sudo -u $PERMUSER" - echo "%wheel ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers + echo "%wheel ALL=(ALL) NOPASSWD: ALL + Defaults:%wheel,root runcwd=*" >/etc/sudoers.d/temp fi run_as_user() { @@ -199,7 +200,7 @@ sed -i '/session[[:space:]]*include[[:space:]]*system-local-login/a session opti echo "password optional pam_gnome_keyring.so" >> /etc/pam.d/passwd if [ -x "$(command -v sudo)" ]; then - sed -i '$ d' /etc/sudoers + rm /etc/sudoers.d/temp fi yes | paru -Scc