added sudo to builder user
This commit is contained in:
6
dist/pacman.sh
vendored
6
dist/pacman.sh
vendored
@@ -33,7 +33,13 @@ else
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo "Building paru as root is not allowed. Creating a temporary user for building..."
|
||||
TEMP_USER="builder"
|
||||
pacman -S --noconfirm sudo
|
||||
useradd -m "$TEMP_USER"
|
||||
# add user to sudoers with no password
|
||||
echo "$TEMP_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
usermod -aG wheel "$TEMP_USER"
|
||||
usermod -aG sudo "$TEMP_USER"
|
||||
|
||||
echo "Adding temporary user pwd"
|
||||
yes | passwd -d "$TEMP_USER"
|
||||
chown -R "$TEMP_USER":"$TEMP_USER" .
|
||||
|
||||
Reference in New Issue
Block a user