added new user autologin to setup script

This commit is contained in:
sose 2020-06-20 19:30:54 -07:00
parent cd5623383b
commit 61307a2f31
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ configure_user() {
chown "$tilde_username:$tilde_username" "/home/$tilde_username"
echo "Mounting sshfs filesystem..."
sshfs "$tilde_username@$tilde_name":"/home/$tilde_username" "/home/$tilde_username" -o ssh_command="ssh -i $key_file" -o allow_other
mkdir '/etc/systemd/system/getty@tty1.service.d'
echo "[Service]" > '/etc/systemd/system/getty@tty1.service.d/override.conf'
echo "ExecStart=" >> '/etc/systemd/system/getty@tty1.service.d/override.conf'
echo "ExecStart=-/sbin/agetty --autologin $tilde_username %I $TERM" >> '/etc/systemd/system/getty@tty1.service.d/override.conf'
echo "Type=idle" >> '/etc/systemd/system/getty@tty1.service.d/override.conf'
# touch /usr/bin/sshshell
# echo "#!/bin/sh" >> /usr/bin/sshshell
# echo "ssh -i $key_file $tilde_username@$tilde_name" >> /usr/bin/sshshell