Ephemeral guest account: a non-password guest account that does not persist any data accross sessions. This is helpful for borrowing the computer to someone without any fear that they might mess up anything when e.g. downloading files. Also gives them a privacy guarantee.
I use the following steps to setup an ephemeral guest account on Ubuntu 19.04 replicating the behaviour of previos Ubuntu versions. With 18.04 (?) the switch to GDM meant the removal of the previous guest account feature.
I suggest to use the normal "add user" functionality in Gnome. However, it won't allow to create an
user without password. To remove the password run: sudo passwd -d guest
.
You also want to make sure that you've set your own home folder such that it is not accessible for
the guest user: chmod 700 /home/${USERNAME}
.
Add the following lines in /etc/gdm3/PostSession/Default
:
if [ ${USERNAME} = "guest" ];then
rm -rvf /home/guest
mkdir /home/guest
chown guest:guest /home/guest
chmod 700 /home/guest
fi
# (before the exit 0 obviously)