From: Ian Kelling Date: Tue, 21 Dec 2021 03:07:47 +0000 (-0500) Subject: set sudo group earlier to be safe X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=683400c6a28e49f3db1fc1bd051b7fc3efc63336;p=automated-distro-installer set sudo group earlier to be safe --- diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index 4e25d97..b248bd3 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -80,6 +80,10 @@ echo "fs.inotify.max_user_watches = 50000" >> $f # applies it. it would be also be applied after a reboot $ROOTCMD sysctl --system +if getent group sudo >/dev/null; then + usermod -aG sudo iank +fi + cat >$target/etc/sudoers.d/ianksudoers <<'EOF' Defaults timestamp_timeout=1440 # used in bashrc diff --git a/fai/config/scripts/GRUB_PC/11-iank b/fai/config/scripts/GRUB_PC/11-iank index e27260e..93df655 100755 --- a/fai/config/scripts/GRUB_PC/11-iank +++ b/fai/config/scripts/GRUB_PC/11-iank @@ -379,7 +379,7 @@ f=/etc/ssh/sshd_config grep -xFq "$line" $f || tee -a $f <<<"$line" -# default debian groups (jessie through buster) + adm, sudo, root, admin +# default debian groups (jessie through buster) + adm, root, admin for g in cdrom floppy audio dip video plugdev netdev adm sudo admin; do if getent group $g >/dev/null; then usermod -aG $g iank