After I saw this answer, I realized that there are many guest accounts on my system:
grep guest /etc/passwd guest-jzXeRx:x:117:127:Guest,,,:/tmp/guest-jzXeRx:/bin/false guest-l5dAPU:x:118:128:Guest,,,:/tmp/guest-l5dAPU:/bin/false guest-FdSAkw:x:119:129:Guest,,,:/tmp/guest-FdSAkw:/bin/false guest-eBU0cU:x:121:131:Guest,,,:/tmp/guest-eBU0cU:/bin/false
Moreover, in this moment there is nobody logged as guest, but if somebody will login as guest, a new guest account is created - why, since there are already other guest accounts? After the new guest will log out, his account will be deleted. But why the other guest accounts remain? For what use/purpose?
It doesn't mind me at all this guest account, but I want to know if it is okay to delete them manually.
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:
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:
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 intmpfs
is temporary in the sense that no files will be created on the hard drive; however, on reboot, everything intmpfs
will be lost.As you know that every time a guest session starting by a user , a temporary user will be created with limited privileges and when he ends the session the data will be erased about his session.
but next time if any other user trying to do guest session means again a new guest session have to create with new guest ID.
so Ubuntu setting all the created guest id's to false , so that when you set a users shell to
/usr/bin/false
, they will not be able log in with older guest ID's and new Id have to create everytime.In your question we have many guest users guest-jzXeRx ,guest-l5dAPU ,guest-FdSAkw ,guest-eBU0cU. these are the guest ID's and with those you will not be able to login next time.hope that helps my friend.
To remove all guest accounts:
Sample output: