Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1051629

Summary: Remove user -- keep files: running '/usr/sbin/userdel' failed: Child process exited with code 8
Product: Red Hat Enterprise Linux 7 Reporter: Matthias Clasen <mclasen>
Component: accountsserviceAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.0CC: mboisver, mclasen, pvine
Target Milestone: rc   
Target Release: 7.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1051525 Environment:
Last Closed: 2014-06-13 12:04:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1051525    
Bug Blocks:    

Description Matthias Clasen 2014-01-10 18:01:39 UTC
+++ This bug was initially created as a clone of Bug #1051525 +++

Version-Release number of selected component (if applicable):
RHEL-7.0-20140109.n.0

Steps to Reproduce: 
Add a user account you won't mind deleting


 1. Go to User Accounts (Settings)
 2. Unlock settings
 3. Click on the account you'd like to delete
 4. Click on the - sign below.
 5. Click 'Keep files'



Actual results: 
dialog window pops-up: running '/usr/sbin/userdel' failed: Child process exited with code 8

Expected results:
The account should be removed and his home directory shouldn't be deleted

--- Additional comment from Martin Holec on 2014-01-10 09:16:35 EST ---

When I choose "delete files" instead, I don't get any error.

--- Additional comment from Matthias Clasen on 2014-01-10 12:20:35 EST ---

Exit code 8 means: user is still logged in. We could certainly provide a better error message here. If you choose 'delete', we pass -f to userdel, so it goes ahead even though the user is still logged in.

Comment 1 Matthias Clasen 2014-01-10 18:02:39 UTC
We should consistently use -f when calling userdel in the accountsservice.

See https://bugs.freedesktop.org/show_bug.cgi?id=65752 for the upstream fix

Comment 3 Michael Boisvert 2014-01-31 16:09:59 UTC
With accountsservice-0.6.35-7.el7 and an older version of control-center installed, I was able to delete a logged in user without error because -f was called.

Verified.

Comment 4 Ludek Smid 2014-06-13 12:04:37 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.