<div dir="ltr"><div><span id="result_box" class="" lang="en"><span class="">Hi everyone</span><span>,<br><br></span></span><br><span id="result_box" class="" lang="en"><span class="">I found</span> <span class="">the following error: "authentication failed (no account associated with Kerberos principal <a href="mailto:usuipa@FI.EXAMPLE.COM">usuipa@FI.EXAMPLE.COM</a>)"</span></span>.<br><br>I suspect that is missing in FreeIPA give to this user permissions to access by kerberos.<br><br>what do you think about it ?.<br><br><span id="result_box" class="" lang="en"><span class=""><span id="result_box" class="" lang="en"><span class=""><span id="result_box" class="" lang="en"><span class=""><span id="result_box" class="" lang="en"><span class="">I'</span><span class="">m</span> <span class="">newbie </span></span></span></span></span><span class="">in</span> <span class="">these</span> <span class="">matters</span>, so <span class=""></span></span>I appreciate</span> <span class="">any help</span> <span class="">or comments</span><span> :)</span></span><br><span id="result_box" class="" lang="en"><span class=""><br>Oh!, This is the </span><span class="">full</span> <span class="">error message</span></span>:<br><br></div>------------------------------------------ LOG ---------------------------------------<br>2014-11-27 09:35:50,067 WARN [ImapServer-2] [ip=192.168.99.100;] account - authentication failed (no account associated with Kerberos principal <a href="mailto:usuipa@FI.EXAMPLE.COM">usuipa@FI.EXAMPLE.COM</a>)<br>2014-11-27 09:35:50,068 WARN [ImapServer-2] [ip=192.168.99.100;] imap - SaslServer.evaluateResponse() failed<br>javax.security.sasl.SaslException: Problem with callback handler [Caused by javax.security.sasl.SaslException: <a href="mailto:usuipa@FI.EXAMPLE.COM">usuipa@FI.EXAMPLE.COM</a> is not authorized to connect as usuipa]<br> at com.sun.security.sasl.gsskerb.GssKrb5Server.doHandshake2(GssKrb5Server.java:309)<br> at com.sun.security.sasl.gsskerb.GssKrb5Server.evaluateResponse(GssKrb5Server.java:149)<br> at com.zimbra.cs.security.sasl.GssAuthenticator.handle(GssAuthenticator.java:182)<br> at com.zimbra.cs.imap.ImapHandler.continueAuthentication(ImapHandler.java:269)<br> at com.zimbra.cs.imap.ImapHandler.continueAuthentication(ImapHandler.java:260)<br> at com.zimbra.cs.imap.NioImapHandler.processRequest(NioImapHandler.java:121)<br> at com.zimbra.cs.imap.NioImapHandler.messageReceived(NioImapHandler.java:61)<br> at com.zimbra.cs.server.NioHandlerDispatcher.messageReceived(NioHandlerDispatcher.java:88)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)<br> at com.zimbra.cs.server.NioLoggingFilter.messageReceived(NioLoggingFilter.java:60)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)<br> at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)<br> at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:75)<br> at org.apache.mina.core.session.IoEvent.run(IoEvent.java:63)<br> at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:780)<br> at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:772)<br> at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:714)<br> at java.lang.Thread.run(Thread.java:744)<br>Caused by: javax.security.sasl.SaslException: <a href="mailto:usuipa@FI.EXAMPLE.COM">usuipa@FI.EXAMPLE.COM</a> is not authorized to connect as usuipa<br> at com.sun.security.sasl.gsskerb.GssKrb5Server.doHandshake2(GssKrb5Server.java:301)<br> ... 21 more<br><br>--------------------------------------- END LOG ---------------------------------------<br><div><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-25 16:02 GMT-02:00 Maria Jose Yañez Dacosta <span dir="ltr"><<a href="mailto:mariajose1982@gmail.com" target="_blank">mariajose1982@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>S<span lang="en"><span><span lang="en"><span>orry for</span> <span>delay</span> <span>in answering, I've been testing a few things before going back to ask.<br></span></span><br>Thanks for the advice</span><span>, I'll</span> <span>be careful with</span> <span>security :).<br><br>I also tried as is explained in the url you shared with me and as you suspected that isn't the problem either.<br><br>I installed Wireshark, </span></span><span lang="en"><span>packet capture</span> <span>shows me</span> <span>these errors:<br><br>error_code: KRB5KRB_AP_ERR_BAD_INTEGRITY (31)<br>e-text: PREAUTH_FAILED<br><br>Where the origin of these packages is the FreeIPA server and the destination is the Zimbra server.<br><br></span></span><span lang="en"><span><span lang="en"><span>I think this may</span> <span>be</span> <span>causing problems.</span></span></span></span><span lang="en"><span><span lang="en"><span><br><br>I'm ashamed to say this, but haven't known as I have to do to debug Imap process on the server using KRB5_TRACE.<br><br></span></span></span></span></div><div><span lang="en"><span><span lang="en"><span>Thanks so much for all your help and if you have more suggestions, it would be appreciated.<br><br></span></span></span></span></div><div><span lang="en"><span><span lang="en"><span>Have a good day. <br></span></span></span></span></div><div><span lang="en"><span><span lang="en"><span><br></span></span></span></span></div><div><span lang="en"><span><span lang="en"><span><br></span></span><br></span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-25 15:00 GMT-02:00 <span dir="ltr"><<a href="mailto:freeipa-users-request@redhat.com" target="_blank">freeipa-users-request@redhat.com</a>></span>:<div><div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Freeipa-users mailing list submissions to<br>
<a href="mailto:freeipa-users@redhat.com" target="_blank">freeipa-users@redhat.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:freeipa-users-request@redhat.com" target="_blank">freeipa-users-request@redhat.com</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:freeipa-users-owner@redhat.com" target="_blank">freeipa-users-owner@redhat.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Freeipa-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Is it possible to set up SUDO with redudancy?<br>
(Lukas Slebodnik)<br>
2. Re: Setting up a Kerberized IMAP Server. (Petr Spacek)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 25 Nov 2014 09:02:59 +0100<br>
From: Lukas Slebodnik <<a href="mailto:lslebodn@redhat.com" target="_blank">lslebodn@redhat.com</a>><br>
To: William Muriithi <<a href="mailto:william.muriithi@gmail.com" target="_blank">william.muriithi@gmail.com</a>><br>
Cc: <a href="mailto:freeipa-users@redhat.com" target="_blank">freeipa-users@redhat.com</a><br>
Subject: Re: [Freeipa-users] Is it possible to set up SUDO with<br>
redudancy?<br>
Message-ID: <<a href="mailto:20141125080259.GB2590@mail.corp.redhat.com" target="_blank">20141125080259.GB2590@mail.corp.redhat.com</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On Mon, Nov 24, 2014 at 8:38 PM, William Muriithi <<br>
<a href="mailto:william.muriithi@gmail.com" target="_blank">william.muriithi@gmail.com</a>> wrote:<br>
<br>
> Evening,<br>
><br>
> After looking at almost all the SUDO documentation I could find, it looks<br>
> one has to hardcode FreeIPA hostname on sssd.conf file. Below is what red<br>
> hat advice to add in sssd config file.<br>
><br>
> services = nss, pam, ssh, pac, sudo [domain/<a href="http://idm.coe.muc.redhat.com" target="_blank">idm.coe.muc.redhat.com</a>]<br>
> sudo_provider = ldap ldap_uri = ldap://<a href="http://grobi.idm.coe.muc.redhat.com" target="_blank">grobi.idm.coe.muc.redhat.com</a><br>
> ldap_sudo_search_base = ou=sudoers,dc=idm,dc=coe,dc=muc,dc=redhat,dc=com<br>
> ldap_sasl_mech = GSSAPI ldap_sasl_authid = host/<br>
> <a href="http://tiffy.idm.coe.muc.redhat.com" target="_blank">tiffy.idm.coe.muc.redhat.com</a> ldap_sasl_realm = <a href="http://IDM.COE.MUC.REDHAT.COM" target="_blank">IDM.COE.MUC.REDHAT.COM</a><br>
> krb5_server = <a href="http://grobi.idm.coe.muc.redhat.com" target="_blank">grobi.idm.coe.muc.redhat.com</a><br>
><br>
> The implications of adding above is that SUDO would break if the<br>
> hardcoded ipa is not available even if there is another replica somewhere<br>
> in the network. Is that correct assumption?<br>
><br>
> Is there a better way of doing it that I have missed?<br>
><br>
<br>
Which version of sssd do you have?<br>
sssd >= 1.10 has native ipa suod providers and you don't need to use<br>
"sudo_provider = ldap".<br>
<br>
LS<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 25 Nov 2014 10:11:42 +0100<br>
From: Petr Spacek <<a href="mailto:pspacek@redhat.com" target="_blank">pspacek@redhat.com</a>><br>
To: <a href="mailto:freeipa-users@redhat.com" target="_blank">freeipa-users@redhat.com</a><br>
Subject: Re: [Freeipa-users] Setting up a Kerberized IMAP Server.<br>
Message-ID: <<a href="mailto:547447CE.8090400@redhat.com" target="_blank">547447CE.8090400@redhat.com</a>><br>
Content-Type: text/plain; charset=windows-1252<br>
<br>
On 24.11.2014 17:45, Maria Jose Ya?ez Dacosta wrote:<br>
> Thank you for your prompt reply :).<br>
><br>
> I still don't discover what caused the problem, but now I could get more<br>
> information about the problem.<br>
><br>
> I run the command that you commented me, I did as follows:<br>
><br>
> - kinit usuipa<br>
> - kvno imap/<a href="mailto:zimbrafreeipa.example.com@FI.example.com" target="_blank">zimbrafreeipa.example.com@FI.example.com</a><br>
><br>
> (I said in my previous mail <a href="http://fi.example.com" target="_blank">fi.example.com</a> but should have said<br>
> <a href="http://zimbrafreeipa.example.com" target="_blank">zimbrafreeipa.example.com</a>.<br>
> Forgiveness!!).<br>
><br>
> Then run klist and got this:<br>
><br>
> 11/24/14 14:04:53 11/25/14 14:04:50 krbtgt/<a href="mailto:FI.EXAMPLE.COM@FI.EXAMPLE.COM" target="_blank">FI.EXAMPLE.COM@FI.EXAMPLE.COM</a><br>
> 11/24/14 14:05:52 11/25/14 14:04:50 imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a><br>
><br>
> Then run<br>
> KRB5_TRACE=/dev/stdout kvno imap/<a href="mailto:zimbrafreeipa.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.example.com@FI.EXAMPLE.COM</a><br>
> and got this:<br>
> --------------------------------------- OUTPUT<br>
> ---------------------------------------------------------------<br>
> [20649] 1416845334.9690: Getting credentials <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -> imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> using ccache FILE:/tmp/krb5cc_0<br>
> [20649] 1416845334.27562: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -> imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> from FILE:/tmp/krb5cc_0 with<br>
> result: 0/Conseguido<br>
> imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a>: kvno = 2<br>
> --------------------------------------- END OF OUTPUT<br>
> ---------------------------------------------------<br>
><br>
> When I rum<br>
> KRB5_TRACE=/dev/stdout thunderbird<br>
> this show:<br>
><br>
> --------------------------------------- OUTPUT<br>
> ---------------------------------------------------------------<br>
> Gtk-Message: Failed to load module "canberra-gtk-module":<br>
> libcanberra-gtk-module.so: no se puede abrir el fichero del objeto<br>
> compartido: No existe el fichero o el directorio<br>
> [20906] 1416845377.323420: ccselect module realm chose cache<br>
> FILE:/tmp/krb5cc_0 with client principal <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> for server<br>
> principal imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a><br>
> [20906] 1416845377.323834: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -><br>
> krb5_ccache_conf_data/proxy_impersonator@X-CACHECONF: from<br>
> FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found<br>
> [20906] 1416845377.323939: Getting credentials <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -><br>
> imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> using ccache<br>
> FILE:/tmp/krb5cc_0<br>
> [20906] 1416845377.324677: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -> imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> from FILE:/tmp/krb5cc_0 with<br>
> result: 0/Conseguido<br>
> [20906] 1416845377.325617: Creating authenticator for <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a><br>
> -> imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a>, seqnum 138355536,<br>
> subkey aes256-cts/3BB4, session key aes256-cts/A007<br>
> [20906] 1416845377.353847: ccselect module realm chose cache<br>
> FILE:/tmp/krb5cc_0 with client principal <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> for server<br>
> principal imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a><br>
> [20906] 1416845377.353971: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -><br>
> krb5_ccache_conf_data/proxy_impersonator@X-CACHECONF: from<br>
> FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found<br>
> [20906] 1416845377.354331: Read AP-REP, time 1416845380.325675, subkey<br>
> (null), seqnum 1067232298<br>
> [20906] 1416845396.10173: ccselect module realm chose cache<br>
> FILE:/tmp/krb5cc_0 with client principal <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> for server<br>
> principal imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a><br>
> [20906] 1416845396.10290: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -><br>
> krb5_ccache_conf_data/proxy_impersonator@X-CACHECONF: from<br>
> FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found<br>
> [20906] 1416845396.10316: Getting credentials <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -> imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> using ccache FILE:/tmp/krb5cc_0<br>
> [20906] 1416845396.10391: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -> imap/<br>
> <a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a> from FILE:/tmp/krb5cc_0 with<br>
> result: 0/Conseguido<br>
> [20906] 1416845396.10469: Creating authenticator for <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a><br>
> -> imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a>, seqnum 592157704,<br>
> subkey aes256-cts/5F4D, session key aes256-cts/A007<br>
> [20906] 1416845396.35033: ccselect module realm chose cache<br>
> FILE:/tmp/krb5cc_0 with client principal <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> for server<br>
> principal imap/<a href="mailto:zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM" target="_blank">zimbrafreeipa.fi.example.com@FI.EXAMPLE.COM</a><br>
> [20906] 1416845396.35196: Retrieving <a href="mailto:usuipa@FI.EXAMPLE.COM" target="_blank">usuipa@FI.EXAMPLE.COM</a> -><br>
> krb5_ccache_conf_data/proxy_impersonator@X-CACHECONF: from<br>
> FILE:/tmp/krb5cc_0 with result: -1765328243/Matching credential not found<br>
> [20906] 1416845396.35293: Read AP-REP, time 1416845399.10477, subkey<br>
> (null), seqnum 911725412<br>
><br>
> --------------------------------------- END OF OUTPUT<br>
> ---------------------------------------------------<br>
<br>
This seems okay, Thunderbird got necessary ticket so the problem could be on<br>
server side. (Just to be 100% sure: Did you configure network.negotiate-auth<br>
option in Thunderbird according to<br>
<a href="https://jpolok.web.cern.ch/jpolok/kerberos-macosx.html" target="_blank">https://jpolok.web.cern.ch/jpolok/kerberos-macosx.html</a> ?)<br>
<br>
> About permissions on keytab file, I have as following:<br>
><br>
> ls -l /opt/zimbra/conf/krb5.keytab<br>
> -rwxrwxrwx 1 zimbra zimbra 366 nov 20 14:45 /opt/zimbra/conf/krb5.keytab<br>
><br>
> Selinux (/etc/selinux/config)<br>
> SELINUX=disabled<br>
><br>
> What do you think about this?,<br>
<br>
That it is completely insecure :-) Seriously, keytab contains symmetric<br>
cryptographic keys so it should be protected as much as feasible.<br>
<br>
It is fine for testing purposes (assuming that you do not forget to secure<br>
file permissions and generate new keytab before moving it to production).<br>
<br>
As a next step please raise debug levels on the server and possibly use<br>
KRB5_TRACE=/dev/stdout trick for IMAP server process.<br>
<br>
--<br>
Petr^2 Spacek<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Freeipa-users mailing list<br>
<a href="mailto:Freeipa-users@redhat.com" target="_blank">Freeipa-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/freeipa-users" target="_blank">https://www.redhat.com/mailman/listinfo/freeipa-users</a><br>
<br>
End of Freeipa-users Digest, Vol 76, Issue 111<br>
**********************************************<br>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Maria José</div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Maria José</div>
</div>