fails to remove user, but removes home
Bug #237899 reported by
Andreas Hasenack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adduser (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: adduser
hardy 8.04
adduser-
When "deluser --remove-home testuser" is called while testuser is logged in, the home is removed, but not the user account:
root@maestro:~# deluser --remove-home testuser
Looking for files to backup/remove ...
Removing files ...
Removing user `testuser' ...
Warning: Removing group `testuser', since no other user is part of it.
userdel: user testuser is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel testuser' returned error code 8. Exiting.
Now /home/testuser is gone. There is no point in "protecting" the user account removal with the logged in check if the home will be removed.
To post a comment you must log in.
deluser, the "low level" utility, works correctly:
root@maestro:~# ls -lad /home/testuser
drwxr-xr-x 2 testuser testuser 4096 2008-06-06 10:58 /home/testuser
root@maestro:~# userdel -r testuser
userdel: user testuser is currently logged in
root@maestro:~# ls -lad /home/testuser
drwxr-xr-x 2 testuser testuser 4096 2008-06-06 10:58 /home/testuser