fails to remove user, but removes home

Bug #237899 reported by Andreas Hasenack
2
Affects Status Importance Assigned to Milestone
adduser (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: adduser

hardy 8.04
adduser-3.105ubuntu1

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.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

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

Revision history for this message
Jonathan Compton (jecompton) wrote :

This release is no longer supported. If this is still a problem in a currently supported version (12.04, 13.04, 14.10) create a new bug report.

Changed in adduser (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.