From 3c2314a07d20a25a61ed9b0ff3f9e7cbdaeb791e Mon Sep 17 00:00:00 2001 From: MatMoul Date: Tue, 13 Oct 2015 21:48:25 +0200 Subject: [PATCH] move aurbuilder sudo right to /etc/sudoers.d/aurbuilder --- config/sudoers/menu | 4 +++- updates/menu | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/sudoers/menu b/config/sudoers/menu index 7dcac4a..43364e0 100644 --- a/config/sudoers/menu +++ b/config/sudoers/menu @@ -48,7 +48,9 @@ case $sel in sudoers=$(ls /etc/sudoers.d) sudoerlist=() for itm in $sudoers; do - sudoerlist+=("$itm" "") + if [ ! "$itm" = "aurbuilder" ]; then + sudoerlist+=("$itm" "") + fi done sel=$(whiptail --backtitle "$apptitle" --title "Delete sudoer :" --menu "" --cancel-button "Cancel" 0 0 0 \ "${sudoerlist[@]}" \ diff --git a/updates/menu b/updates/menu index 3d12b12..c641a64 100644 --- a/updates/menu +++ b/updates/menu @@ -45,8 +45,8 @@ checkaurdependencies(){ newpass=$(< /dev/urandom tr -dc "@#*%&_A-Z-a-z-0-9" | head -c16) useradd -r -N -M -d /home/.aurbuilder -s /usr/bin/nologin aurbuilder echo -e "$newpass\n$newpass\n"|passwd aurbuilder - echo "aurbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - echo "root ALL=(aurbuilder) NOPASSWD: ALL" >> /etc/sudoers + echo "aurbuilder ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/aurbuilder + echo "root ALL=(aurbuilder) NOPASSWD: ALL" >> /etc/sudoers.d/aurbuilder newpass="" fi }