abudden committed 39d0139

Include sudo as standard and set up main user.

  • Participants
  • Parent commits 3b1c604

Comments (0)

Files changed (1)


 genfstab -p /mnt >> /mnt/etc/fstab
 # Install the bare minimum of essential applications:
 pacstrap /mnt \
+	sudo \
 	python \
     python2 \
     mercurial \
+echo "%sudo ALL=(ALL) ALL" > /mnt/etc/sudoers.d/sudo_group
 # Prepare a script for a chroot session.
 cat > ./ <<EOF
 mkdir -p /boot/grub/locale
 cp /usr/share/locale/en\@quot/LC_MESSAGES/ /boot/grub/locale/
 grub-mkconfig -o /boot/grub/grub.cfg
+groupadd sudo
 # Make the script executable and use it
 mv ./ /mnt
 arch-chroot /mnt /
 rm /mnt/
-echo "Done: use passwd to set the root password, then"
-echo "power off, remove the CD and reboot."
+cat > ./ <<EOF
+echo "Root password:"
+passwd --root /mnt
+echo ""
+read -p "User name:" username
+useradd --root /mnt -m -s /bin/bash -g users -G sudo \${username}
+echo ""
+echo "User password:"
+passwd --root /mnt \${username}
+umount /mnt/{home,boot,}
+echo ""
+echo "Done: power off, remove the CD and reboot."
+chmod +x ./
+echo "Done: now run './'"