<div dir="ltr"><div><div>I've updated all the relevant hosts and the FreeIPA server to the COPR sssd 1.14.0 release and the problem seems to have disappeared.<br><br></div>Cheers<br></div>L.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>------<br>The most dangerous phrase in the language is, "We've always done it this way."<br><br>- Grace Hopper<br></div></div></div></div>
<br><div class="gmail_quote">On 15 July 2016 at 10:09, Lachlan Musicman <span dir="ltr"><<a href="mailto:datakid@gmail.com" target="_blank">datakid@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>AH. I'm seeing a lot of this now.<br><br>hbac_eval_user_element is returning the wrong number of groups.<br><br></div>I just found another instance in my logs :<br><br>(Fri Jul 15 08:39:04 2016) [sssd[be[<a href="http://unix.petermac.org.au" target="_blank">unix.petermac.org.au</a>]]] [hbac_eval_user_element] (0x1000): [23] groups for [SimpsonLachlan]<br><br><br>IPA server<br>[root@vmpr-linuxidm ~]# id <a href="mailto:simpsonlachlan@petermac.org.au" target="_blank">simpsonlachlan@petermac.org.au</a> | tr "," "\n" | wc -l<br>41<br><br>Host <br>[root@papr-res-galaxy ~]# id <a href="mailto:simpsonlachlan@petermac.org.au" target="_blank">simpsonlachlan@petermac.org.au</a> | tr "," "\n" |wc -l<br>41<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">L.<br></font></span></div><div class="gmail_extra"><span class=""><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div>------<br>The most dangerous phrase in the language is, "We've always done it this way."<br><br>- Grace Hopper<br></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On 15 July 2016 at 09:45, Lachlan Musicman <span dir="ltr"><<a href="mailto:datakid@gmail.com" target="_blank">datakid@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div><div>On 14 July 2016 at 17:44, Sumit Bose <span dir="ltr"><<a href="mailto:sbose@redhat.com" target="_blank">sbose@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Thu, Jul 14, 2016 at 11:47:41AM +1000, Lachlan Musicman wrote:<br>
> Ok, I have some logs of sssd 1.13.0 not working. Same values as before:<br>
><br>
> FreeIPA server: Centos 7, ipa 4.2, API_VERSION 2.156<br>
><br>
> Installed Packages<br>
> Name        : ipa-server<br>
> Arch        : x86_64<br>
> Version     : 4.2.0<br>
> Release     : 15.0.1.el7.centos.17<br>
> Size        : 5.0 M<br>
> Repo        : installed<br>
> >From repo   : updates<br>
> Summary     : The IPA authentication server<br>
><br>
><br>
> Successfully joined in one way trust to AD.<br>
><br>
> Successfully have added hosts (Centos 7, sssd 1.13.0).<br>
><br>
><br>
> [root@vmpr-linuxidm ~]# ipa hbacrule-find<br>
> --------------------<br>
> 5 HBAC rules matched<br>
> --------------------<br>
><br>
>   Rule name: allow_all<br>
>   User category: all<br>
>   Host category: all<br>
>   Service category: all<br>
>   Description: Allow all users to access any host from any host<br>
>   Enabled: FALSE<br>
><br>
> ...<br>
><br>
>   Rule name: ssh to galaxy<br>
>   Service category: all<br>
>   Description: Allows ssh to galaxy server<br>
>   Enabled: TRUE<br>
>   User Groups: ad_users<br>
>   Hosts: <a href="http://papr-res-galaxy.unix.petermac.org.au" rel="noreferrer" target="_blank">papr-res-galaxy.unix.petermac.org.au</a><br>
><br>
><br>
><br>
><br>
> With allow_all HBAC rule enabled, can login every time with<br>
><br>
> ssh user@ad_domain@unix_host<br>
><br>
> If I implement a HBAC rule "ssh to galaxy" as per above, with:<br>
><br>
> ad_users is a POSIX group with a GID. It has one member, the group<br>
><br>
> ad_external an external group with a single, external, member<br>
><br>
> <a href="mailto:pmc-res-ipausers@petermac.org.au" target="_blank">pmc-res-ipausers@petermac.org.au</a><br>
><br>
> which is an AD group containing all the users that should have access to<br>
> the host.<br>
><br>
><br>
> With allow_all disabled and "ssh to galaxy" enabled, some users can login<br>
> and some can't. There is no discernable pattern that might explain why some<br>
> are discriminated against.<br>
><br>
> Here is the test from the server:<br>
><br>
> [root@vmpr-linuxidm ~]# ipa hbactest --user=<a href="mailto:sandsjordan@petermac.org.au" target="_blank">sandsjordan@petermac.org.au</a><br>
> --host=<a href="http://papr-res-galaxy.unix.petermac.org.au" rel="noreferrer" target="_blank">papr-res-galaxy.unix.petermac.org.au</a> --service=sshd<br>
> --------------------<br>
> Access granted: True<br>
> --------------------<br>
>   Matched rules: ssh to galaxy<br>
>   Not matched rules: Computing Cluster<br>
>   Not matched rules: FACS Computing<br>
><br>
> I've installed ipa-admintools on the host in question and got the same<br>
> result.<br>
><br>
> To be on the safe side/tick all boxes, I have cleared the cache on the host<br>
> in question:<br>
><br>
> systemctl stop sssd<br>
> sss_cache -E<br>
> systemctl start sssd<br>
><br>
> and confirmed success with a status check.<br>
><br>
> When the user tries to login, it fails.<br>
><br>
> Log is here:<br>
><br>
> <a href="http://dpaste.com/0VAFNPH" rel="noreferrer" target="_blank">http://dpaste.com/0VAFNPH</a><br>
><br>
><br>
> The top is where the negotiating starts to the best of my knowledge.<br>
><br>
> The attempts fails, with no information that is useful to me:<br>
><br>
> 230 (Thu Jul 14 10:40:59 2016) [sssd[be[<a href="http://unix.petermac.org.au" rel="noreferrer" target="_blank">unix.petermac.org.au</a>]]]<br>
> [hbac_get_category] (0x0200): Category is set to 'all'.<br>
> 231 (Thu Jul 14 10:40:59 2016) [sssd[be[<a href="http://unix.petermac.org.au" rel="noreferrer" target="_blank">unix.petermac.org.au</a>]]]<br>
> [hbac_thost_attrs_to_rule] (0x1000): Processing target hosts for rule [ssh<br>
> to galaxy]<br>
> 232 (Thu Jul 14 10:40:59 2016) [sssd[be[<a href="http://unix.petermac.org.au" rel="noreferrer" target="_blank">unix.petermac.org.au</a>]]]<br>
> [hbac_shost_attrs_to_rule] (0x0400): Processing source hosts for rule [ssh<br>
> to galaxy]<br>
> 233 (Thu Jul 14 10:40:59 2016) [sssd[be[<a href="http://unix.petermac.org.au" rel="noreferrer" target="_blank">unix.petermac.org.au</a>]]]<br>
> [hbac_eval_user_element] (0x1000): [3] groups for [<br>
> <a href="mailto:SandsJordan@petermac.org.au" target="_blank">SandsJordan@petermac.org.au</a>]<br>
<br>
</div></div>According to the HBAC evaluation the user is a member of 3 groups. Is<br>
this the expected number?<br>
<br>
Can you check if 'id <a href="mailto:SandsJordan@petermac.org.au" target="_blank">SandsJordan@petermac.org.au</a>' returns the expected<br>
list of groups on the client and the IPA server? (The client does not<br>
talk to AD directly only to the IPA server, so if something is already<br>
missing on the server it cannot be seen on the client as well).<br>
<br></blockquote><div><br></div></div></div><div>No, this is incorrect. He belongs to 14 groups on both the FreeIPA server and the host in question.<br></div><div><br>[root@vmpr-linuxidm ~]# id <a href="mailto:sandsjordan@petermac.org.au" target="_blank">sandsjordan@petermac.org.au</a> | tr "," "\n" | wc -l<br>14<br><br>[root@papr-res-galaxy ~]# id <a href="mailto:sandsjordan@petermac.org.au" target="_blank">sandsjordan@petermac.org.au</a> | tr "," "\n" | wc -l<br>14<br><br> <br></div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Can you send me the SSSD cache file from the client<br>
/var/lib/sss/db/cache_unix.petermac.org.au.ldb after the login attempt?<br>
Since it might contain password hashes you might want to remove<br>
lines with 'cachedPassword' before<br>
<br></blockquote><div><br><br></div></span><div>Ok, off list.<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
bye,<br>
Sumit<br>
<div><div><br></div></div></blockquote></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>