Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Every now and then I would like to give my home desktop or laptop to someone to check their mails or lookup something on the web while I am not watching them. I am using Debian 6 (squeeze) and was looking for a more clever solution than just creating an account for them and delete it afterwards.

Can someone please point me to a Debian package or a step-by-step instruction to setup a non-persistent account for a graphical session that a logged on user can create by some clicks? The account should be deleted from the system at next reboot or so. I am currently using GDM, but open to KDM or lightDM.

share|improve this question
up vote 1 down vote accepted

Just a shot in the dark here but wouldn't creating a user called guest whose $HOME points to /tmp/guest be enough? The contents of /tmp are cleaned out on each reboot (depending on your settings but regulalry in any case).

Unless someone knows why it is a horrible idea, it should at least be worth a try:

sudo useradd -mb /tmp/ guest
share|improve this answer
I went with this solution in the end. Since I did not want the user to logon through ssh, I set its shell to /bin/false. I also added the full-name that is used by gdm: sudo useradd -mb /tmp -s /bin/false -c "Welcome Guest" guest; passwd guest – wigy Jan 9 '13 at 19:24
I would also add sudo passwd -d guest so that anyone can log in without the hassle of entering a password (which is the use case of a guest account most of the time). Works on a Wheezy Stable. – John Christopher Apr 1 '14 at 11:36

All I can offer are some ideas that still need more work:

  • Create a normal account with the right permissions where "/home/guest" is on a ramdisk so it gets refreshed on every boot
  • Add a line that cleans "/home/guest" in the session script
  • Bravely try to compile the Ubuntu gdm-guest-session package into Debian
share|improve this answer
The first 2 ideas seem to be simple enough. You need a password for the guest user that is shared with all the users on the machine who will give it to a guest, otherwise it is perfect. The 3rd option would be ideal, but I do not have the time nowadays to port the Ubuntu package to Debian. I will try the 2nd option and give you feedback. – wigy Jan 6 '13 at 8:46
Thanks, but the command-line of @terdon got me in minutes to a solution with the same compromise that your first 2 ideas. Anyways, thanks for your kind help. – wigy Jan 9 '13 at 19:35
Yes, I am a bit disgusted that I omitted /tmp above. – harrymc Jan 10 '13 at 12:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.