#2850 LOCAL domain: sss_userdel can not delete user if libsemanage fails
Closed: Invalid None Opened 8 years ago by mzidek.

When selinux does not work in the environment, but SSSD was built with libsemanage support then sss_userdel may not be able to delete users previously added with sss_useradd.

How to reproduce:
1. add user with sss_useradd

  • first the user is added to sysdb and then the libsemanage part is called, if the
    libsemanage part fails, the operation fails, but user is not deleted from sysdb.
  1. try to delete user with sss_userdel
  • the libsemanage operations are performed before the user is deleted from sysdb. If the libsemanage operation fails, the tool never proceeds to removal of the user from sysdb. So the user is never deleted.

NOTE: It is reproducible in our current CI (2015-10-22) when CI is built with libsemanage support. But it can happen anytime when selinux operation fails during useradd or userdel.

Possible solutions:

  • In useradd, delete the added user from sysdb if selinux operation fails.
  • In userdel, add --force option that will delete the user even if selinux operations fail

We will need to fix this ticket when we implement management of local users.

milestone: NEEDS_TRIAGE => SSSD 1.15 beta

Fields changed

rhbz: => 0

The local provider is not being developed anymore.

review: 0 => 1
selected: => Not need

Since the local provider is not being actively developed, I'm closing this ticket.

resolution: => worksforme
status: new => closed

Metadata Update from @mzidek:
- Issue set to the milestone: SSSD Future releases (no date set yet)

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/3891

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata