Add scripts for Void scripts

This commit is contained in:
Jarvis Carroll
2025-06-02 23:36:08 +10:00
parent b344241b33
commit c200c89b75
7 changed files with 190 additions and 25 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# Overwrite locale setting specified before the chroot
#export LANG=C
#export LC_ALL=C
# Add a passwordless sudoer
useradd -m -s /bin/bash -G wheel user
passwd -d user
echo "user ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/user"
chmod 0440 "/etc/sudoers.d/user"
# Copy the install scripts into their home directory
cp -r /root/install_scripts /home/user
#chown -R user:user /home/user/install_scripts
# su to this new user... Or sudo -iu, since we want to pass in arguments too.
cd /home/user
sudo -iu user "$@"