The objective is to create a passwordless login for a user named guest, whose home directory is cleared on logout.
This was tested under KDE neon (which is based on Ubuntu 16.04).
The following script clears the home directory of a user and replaces it with a tmpfs containing the contents of /etc/skel
:
#!/bin/sh -e