Thanks, Jeff. Makes sense to me.
Made a merge proposal out of your suggestions, to call the lightdm
maintainer's attention to it faster.
** Changed in: lightdm (Ubuntu)
Importance: Undecided => Low
** Changed in: lightdm (Ubuntu)
Status: New => In Progress
** Changed in: lightdm (Ubuntu)
Assignee: (unassigned) => Gunnar Hjalmarsson (gunnarhj)
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/1556516
Title:
passwd and group entries are not removed on logout from a guest
session
Status in lightdm package in Ubuntu:
In Progress
Bug description:
When a guest session is finished, the guest-xxxx entries don't get
removed from /etc/passwd and /etc/group (at least they don't always
get removed). The problem is that the userdel command in the
/usr/sbin/guest-account script fails because some of the guest
processes are not yet dead at the time that it runs. An earlier line
in the script uses loginctl to tell systemd to kill the guest's
processes, but this isn't completed by the time that userdel runs.
The simplest fix is to just call userdel with the --force flag, so
that it removes the password and group entries even if the processes
are still there. This doesn't cause any problems. The lingering
guest-xxxx processes are gone by the time you log in as a regular
user.
A trivial patch file for /usr/sbin/guest-account is attached. Also,
the 2008 copyright at the top of the file should really be updated! I
don't think that loginctl existed in 2008 (ah, the good ole days :)
Here is the tail of some debugging output that I obtained by modifying
/usr/sbin/guest-account so that I could see what it was going on.
This confirms the behavior that I mentioned above.
+ GUEST_HOME=/tmp/guest-8iwujo
+ [ -x /bin/loginctl ]
+ loginctl kill-user guest-8iwujo
+ [ /tmp/guest-8iwujo = guest-8iwujo ]
+ umount /tmp/guest-8iwujo
umount: /tmp/guest-8iwujo: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
+ umount -l /tmp/guest-8iwujo
+ umount /tmp/guest-8iwujo
umount: /tmp/guest-8iwujo: not mounted
+ umount -l /tmp/guest-8iwujo
umount: /tmp/guest-8iwujo: not mounted
+ true
+ umount /tmp/guest-8iwujo
umount: /tmp/guest-8iwujo: not mounted
+ umount -l /tmp/guest-8iwujo
umount: /tmp/guest-8iwujo: not mounted
+ true
+ rm -rf /tmp/guest-8iwujo
+ xargs -0 rm -rf
+ find /tmp -mindepth 1 -maxdepth 1 -uid 999 -print0
+ [ -d /run/media/guest-8iwujo ]
+ [ -d /media/guest-8iwujo ]
+ ps -lww -u guest-8iwujo
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 S 999 7128 1 0 80 0 - 88460 poll_s ? 00:00:00
at-spi-bus-laun
0 R 999 7214 1 0 80 0 - 162593 - ? 00:00:00 nm-applet
0 R 999 7222 1 1 80 0 - 138676 - ? 00:00:00 tilda
+ userdel guest-8iwujo
userdel: user guest-8iwujo is currently used by process 7128
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1556516/+subscriptions
--
Mailing list: https://launchpad.net/~touch-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp