<div dir="ltr">Yes, getent passwd shows the users, and sssd.conf didn't have enumerate=true. As it turns out, this happens because ypbind was running on the server, which binds to ipa's fake nis server on the same machine. Once I stopped ypbind, I was able to delete those groups. This was an interesting case. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 3:28 AM, Jakub Hrozek <span dir="ltr"><<a href="mailto:jhrozek@redhat.com" target="_blank">jhrozek@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Apr 13, 2016 at 12:30:56AM -0400, Prasun Gera wrote:<br>
> My main ipa server used to be an NIS server. After migrating everything<br>
> into ipa, there is no need for the users and groups to exist in /etc/passwd<br>
> and /etc/group. Leaving them around would cause duplicate entries,<br>
> passwords falling out of sync and other issues on the server. So the right<br>
> approach is to delete all the local users and groups, and let ipa handle<br>
> everything. I was able to delete all the local users from /etc/passwd.<br>
> However, groupdel won't let me delete the local groups. It complains that<br>
> xyz user's primary group is abc and hence you can't delete it.  The user<br>
> itself is not a part of /etc/passwd anymore. This is a bug as far as I can<br>
> tell. groupdel should check these constraints only for local users and<br>
> local groups. It shouldn't mix ipa users and ipa groups with them.<br>
><br>
> Environment: RHEL 7.2, idm 4.x<br>
<br>
</div></div>Looking at groupdel code, they just loop through all users with<br>
getpwent and report a primary group if any of the enumerated users<br>
matched the gid trying to be removed.<br>
<br>
So I would only expect this to happen if enumerate=true is set in<br>
sssd.conf, otherwise it should not be possible to reach those users with<br>
getpwent (if you removed them from passwd already). As a quick check,<br>
you can see if "getent passwd" without a user argument shows those<br>
users.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Manage your subscription for the Freeipa-users mailing list:<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
Go to <a href="http://freeipa.org" rel="noreferrer" target="_blank">http://freeipa.org</a> for more info on the project<br>
</font></span></blockquote></div><br></div>