Why there are many guest accounts on my system?

The guest-XXXXXX entries in /etc/passwd and /etc/group are normally removed when you log out from a guest session. Maybe you have somehow rebooted a few times without logging out first.

You can safely delete the entries. If you do it like this:

sudo deluser guest-jzXeRx

for respective guest username, both /etc/passwd and /etc/group will be cleaned up.


I'm putting in my two cents. It's normal to see that.

In Ubuntu 1000 + User ID (uid) are allowed for Normal user and below 1000(uid) are assigned to system application and daemons. Plus guest accounts are removed periodically. So if you want to check completely how many user are on you system, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

cat /etc/passwd | grep /home

Edit

For me guest accounts are removed periodically (I logged in as guest more than 10 times, but none stayed very long in /etc/passwd). You might want to try it yourself.

Now, Ubuntu's Guest account is a special type of account, which has its home directory set to the mount point of a tmpfs filesystem, which is used to store data which gets lost after a reboot.

The data in tmpfs is stored in RAM, which uses the swap space as a fall back, so it is likely the data has never been written to disk in the first place, so there's basically nothing to recover.

Since tmpfs is temporary storage. It is intended to appear as a mounted file system, but stored in volatile memory instead of a persistent storage device. Everything stored in tmpfs is temporary in the sense that no files will be created on the hard drive; however, on reboot, everything in tmpfs will be lost.