<div dir="ltr">What about /etc/nsswitch.conf?<div>Does it have "sudo: files sss"?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 4, 2016 at 3:50 AM, Tomas Simecek <span dir="ltr"><<a href="mailto:simecek.tomas@gmail.com" target="_blank">simecek.tomas@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">Dear freeipa users/admins,<br>I'm trying to implement freeipa in our company, so that our Unix admins can authenticate on Linux servers using their Windows AD account.<br>Following this guide <a href="https://www.freeipa.org/page/Active_Directory_trust_setup" target="_blank">https://www.freeipa.org/page/Active_Directory_trust_setup</a> it seems to work well, they can login without problems. <br>What I cannot make working is sudo from their AD accounts on Linux.<br><br>No matter what I try, it is still:<br><br>sudo systemctl restart httpd<br>[sudo] password for <a href="mailto:simecek.tomas@sd-stc.cz" target="_blank">simecek.tomas@sd-stc.cz</a>:<br>Sorry, try again.<br><br>Here's our setup:<br>Freeipa server: CentOS Linux release 7.2.1511 (Core), ipa-server-4.2.0-15.0.1.el7.centos.6.1.x86_64<br>Freeipa client: the same<br><br>AD domain name: <a href="http://sd-stc.cz" target="_blank">sd-stc.cz</a><br>IPA domain: <a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a><br><br>When digging in logs and googling, I realized that the problem on client side could be:<br><br>[root@spcss-2t-www ~]# kinit -k<br>kinit: Cannot determine realm for host (principal host/spcss-2t-www@)<br><br>But this seems to work:<br>[root@spcss-2t-www ~]# kinit <a href="mailto:simecek.tomas@SD-STC.CZ" target="_blank">simecek.tomas@SD-STC.CZ</a><br>Password for <a href="mailto:simecek.tomas@SD-STC.CZ" target="_blank">simecek.tomas@SD-STC.CZ</a>:<br>[root@spcss-2t-www ~]# klist<br>Default principal: <a href="mailto:simecek.tomas@SD-STC.CZ" target="_blank">simecek.tomas@SD-STC.CZ</a><br><br>Valid starting       Expires              Service principal<br>07/04/2016 09:36:26  07/04/2016 19:36:26  krbtgt/<a href="mailto:SD-STC.CZ@SD-STC.CZ" target="_blank">SD-STC.CZ@SD-STC.CZ</a><br>        renew until 07/05/2016 09:36:23<br><br>My /etc/sssd/sssd.conf:<br>[domain/<a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a>]<br><br>cache_credentials = True<br>krb5_store_password_if_offline = True<br>ipa_domain = <a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a><br>krb5_realm = <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a><br>id_provider = ipa<br>auth_provider = ipa<br>access_provider = ipa<br>ipa_hostname = <a href="http://spcss-2t-www.linuxdomain.cz" target="_blank">spcss-2t-www.linuxdomain.cz</a><br>chpass_provider = ipa<br>ipa_server = <a href="http://svlxxipap.linuxdomain.cz" target="_blank">svlxxipap.linuxdomain.cz</a><br>ldap_tls_cacert = /etc/ipa/ca.crt<br>override_shell = /bin/bash<br>sudo_provider = ldap<br>ldap_uri = ldap://<a href="http://svlxxipap.linuxdomain.cz" target="_blank">svlxxipap.linuxdomain.cz</a><br>ldap_sudo_search_base = ou=sudoers,dc=linuxdomain,dc=cz<br>ldap_sasl_mech = GSSAPI<br>ldap_sasl_authid = host/<a href="mailto:spcss-2t-www.linuxdomain.cz@LINUXDOMAIN.CZ" target="_blank">spcss-2t-www.linuxdomain.cz@LINUXDOMAIN.CZ</a><br>ldap_sasl_realm = <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a><br>krb5_server = <a href="http://svlxxipap.linuxdomain.cz" target="_blank">svlxxipap.linuxdomain.cz</a><br><br>[sssd]<br>services = nss, sudo, pam, ssh<br>config_file_version = 2<br><br>domains = <a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a><br>[nss]<br>homedir_substring = /home<br>....<br><br>My /etc/krb5.conf:<br>#File modified by ipa-client-install<br><br>includedir /var/lib/sss/pubconf/krb5.include.d/<br><br>[libdefaults]<br>  default_realm = <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a><br>  dns_lookup_realm = true<br>  dns_lookup_kdc = true<br>  rdns = false<br>  ticket_lifetime = 24h<br>  forwardable = yes<br>  udp_preference_limit = 0<br>  default_ccache_name = KEYRING:persistent:%{uid}<br><br><br>[realms]<br>  <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a> = {<br>    pkinit_anchors = FILE:/etc/ipa/ca.crt<br>  }<br><br><br>[domain_realm]<br>  .<a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a> = <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a><br>  <a href="http://linuxdomain.cz" target="_blank">linuxdomain.cz</a> = <a href="http://LINUXDOMAIN.CZ" target="_blank">LINUXDOMAIN.CZ</a><br><br>Would you please suggest which way to investigate? <br><br>Thanks<span class="HOEnZb"><font color="#888888"><br><br>Tomas Simecek<br></font></span></div>
<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></blockquote></div><br></div>