From e225f5e11aa08164b13b499da864bf943b81c7dc Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 7 Nov 2020 22:33:15 -0600 Subject: [PATCH] Install sudo! --- bin/init-dotfiles | 4 ++++ env/arch-linux/provision.d/00-add-user.bash | 1 + 2 files changed, 5 insertions(+) diff --git a/bin/init-dotfiles b/bin/init-dotfiles index e61ce9f..297cf18 100755 --- a/bin/init-dotfiles +++ b/bin/init-dotfiles @@ -124,6 +124,10 @@ echo "and other machines before proceeding." echo echo "Don't forget to setup GPG keys by importing from an existing machine" echo "or adding new child keys!" +if test $is_arch_linux -eq 1; then + echo + echo 'You will need to set a password for your new user.' +fi echo echo "The simplest method for doing this is to run the following:" echo ' scp -r "$TARGET_MACHINE:~/.gnupg" "$HOME/.gnupg' diff --git a/env/arch-linux/provision.d/00-add-user.bash b/env/arch-linux/provision.d/00-add-user.bash index ddecd05..bc2b4d9 100755 --- a/env/arch-linux/provision.d/00-add-user.bash +++ b/env/arch-linux/provision.d/00-add-user.bash @@ -6,6 +6,7 @@ ud="/home/$u" # user exists - we will assume setup has already run if getent passwd "$u"; then exit 0; fi +pacman -S --needed sudo groupadd admin 2>/dev/null mkdir --parents "$ud/.home" "$ud/dl" useradd --home-dir "$ud/.home" \