diff options
author | Helmut Grohne <helmut@subdivi.de> | 2024-03-28 16:03:06 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2024-03-28 16:03:06 +0100 |
commit | f145fdc1cadc10f9aaa82f00af8e05541f38d4a4 (patch) | |
tree | 299be8a07ae91bd057e6e91d4544fa6df007b14e | |
parent | da2d22d423c5085cd65f30f53a0658b6e5e05c71 (diff) | |
download | debvm-f145fdc1cadc10f9aaa82f00af8e05541f38d4a4.tar.gz |
useraddhook: tell which customizations are performed
-rwxr-xr-x | useraddhook/customize.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/useraddhook/customize.sh b/useraddhook/customize.sh index d405b72..bc827a7 100755 --- a/useraddhook/customize.sh +++ b/useraddhook/customize.sh @@ -29,13 +29,16 @@ set -eu chroot "$1" useradd --home-dir "/home/$USERNAME" --create-home --shell /bin/bash "$USERNAME" chroot "$1" passwd --delete "$USERNAME" if chroot "$1" getent group sudo >/dev/null; then + echo "Adding $USERNAME to sudo group" chroot "$1" usermod --append --groups sudo "$USERNAME" fi if [ -e "$1"/root/.ssh/authorized_keys ]; then + echo "Installing ssh authorized_keys for $USERNAME" chroot "$1" install -o "$USERNAME" -g "$USERNAME" -m 700 -d "/home/$USERNAME/.ssh" chroot "$1" install -o "$USERNAME" -g "$USERNAME" -t "/home/$USERNAME/.ssh" /root/.ssh/authorized_keys fi if [ -e "$1/etc/lightdm/lightdm.conf" ]; then + echo "Enabling autologin in lightdm for $USERNAME" cat >>"$1/etc/lightdm/lightdm.conf" <<EOF [SeatDefaults] autologin-user=$USERNAME |