Bug#528060: Can't delete user: user is currently logged in

2009-05-11 Thread Nicolas François
Hi, There's already a note about it in userdel.c (user_busy), but I think it is time to remove the check based on utmp, and check if there are processes or tasks in /proc whose real, effective, or saved ID is the user's ID (ditto if the group is meant to be removed). In the mean time, I could

Bug#528060: Can't delete user: user is currently logged in

2009-05-10 Thread Loïc Minier
Package: passwd Version: 1:4.1.3.1-1 Severity: normal File: /usr/sbin/userdel Hi Following these steps, I systematically am prevented to deluser foobar: - on tty1 as root, adduser foobar, password foo - on tty2, login as foobar/foo, then ^D to logout - on tty1 as root, deluser

Bug#528060: Can't delete user: user is currently logged in

2009-05-10 Thread Nicolas François
Hello, On Sun, May 10, 2009 at 05:29:28PM +0200, l...@dooz.org wrote: Following these steps, I systematically am prevented to deluser foobar: - on tty1 as root, adduser foobar, password foo - on tty2, login as foobar/foo, then ^D to logout - on tty1 as root, deluser foobar:

Bug#528060: Can't delete user: user is currently logged in

2009-05-10 Thread Nicolas François
Hi, On Sun, May 10, 2009 at 06:40:51PM +0200, Nicolas François wrote: On Sun, May 10, 2009 at 05:29:28PM +0200, l...@dooz.org wrote: Following these steps, I systematically am prevented to deluser foobar: - on tty1 as root, adduser foobar, password foo - on tty2, login as

Bug#528060: Can't delete user: user is currently logged in

2009-05-10 Thread Loïc Minier
On Sun, May 10, 2009, Nicolas François wrote: Did you make changes in one of: /etc/login.defs /etc/pam.d/login /etc/pam.d/common-session (and maybe some other pam.d files) It's an old install, I checked quickly with pkgs=$(dlocate /etc/pam.d/ | sed 's/:.*//' | sort -u | xargs) for p

Bug#528060: Can't delete user: user is currently logged in

2009-05-10 Thread Loïc Minier
On Sun, May 10, 2009, Loïc Minier wrote: Running ./test_utmp in the situation of the bug gives: ut_type: 7 ut_user: foobar ut_id: 2 ut_type: 6 ut_user: LOGIN ut_id: 2 userdel check user foobar is currently logged in w foobar checks whether the PID still corresponds to an existing