<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> Subject: Re: [Freeipa-users] ipa / sudoers on centos 6.3 client<br>> From: bpk678@gmail.com<br>> To: ctcard@hotmail.com<br>> CC: freeipa-users@redhat.com<br>> Date: Fri, 2 Jan 2015 10:28:16 -0500<br>> <br>> On Fri, 2015-01-02 at 15:19 +0000, Chris Card wrote:<br>> > I have existing machines running CentOS 6.3 which I want to include in<br>> > a freeipa domain.<br>> > <br>> > The domain controller machine is running Fedora 21 and<br>> > freeipa-server-4.1.1-2 while the latest version of ipa I can find that<br>> > runs on CentOS 6.3 is ipa-client-3.0.0-37.el6.x86_64.<br>> > <br>> > <br>> > I have successfully run ipa-client-install on the CentOS 6.3 client<br>> > and set up users who can ssh to the client using ssh-keys.<br>> > <br>> > <br>> > The problem is that I can't get sudo rules to work. I know that the<br>> > ipa client software version 3.0.0 doesn't automatically set up all the<br>> > configuration for sssd to control sudo access, but I have set up all<br>> > the configuration necessary manually:<br>> > <br>> > <br>> > On the client, /etc/nsswitch.conf has <br>> > <br>> > <br>> >       sudoers files sss   <br>> > <br>> > <br>> > /etc/sssd/sssd/conf has<br>> > <br>> > <br>> > [domain/default]<br>> > <br>> > <br>> > cache_credentials = True<br>> > krb5_realm = <REALM><br>> > krb5_server = <ipa server>:88<br>> > id_provider = ldap<br>> > auth_provider = ldap<br>> > chpass_provider = ldap<br>> > ldap_tls_cacertdir = /etc/openldap/cacerts<br>> > [domain/<domain>]<br>> > <br>> > <br>> > cache_credentials = True<br>> > krb5_store_password_if_offline = True<br>> > ipa_domain = <domain><br>> > id_provider = ipa<br>> > auth_provider = ipa<br>> > access_provider = ipa<br>> > chpass_provider = ipa<br>> > ipa_dyndns_update = True<br>> > ipa_server = <ipa server><br>> > ldap_tls_cacert = /etc/ipa/ca.crt<br>> > sudo_provider = ldap<br>> > ldap_uri = ldap://<ipa server><br>> > ldap_sudo_search_base = ou=sudoers,<domain base dn><br>> > ldap_sasl_mech = GSSAPI<br>> > ldap_sasl_authid = host/<client fqdn><br>> > ldap_sasl_realm = <REALM><br>> > krb5_server = <ipa server><br>> > debug_level = 9<br>> > [sssd]<br>> > services = nss, pam, ssh, sudo<br>> > config_file_version = 2<br>> > <br>> > <br>> > domains = <domain>, default<br>> > debug_level = 9<br>> > [nss]<br>> > debug_level = 9<br>> > <br>> > <br>> > [pam]<br>> > debug_level = 9<br>> > <br>> > <br>> > [sudo]<br>> > debug_level = 9<br>> > [autofs]<br>> > <br>> > <br>> > I have validated the ldap sasl configuration using ldapsearch, so I'm<br>> > sure they are correct.<br>> > <br>> > <br>> > The nisdomainname command returns the domain name.<br>> > <br>> > <br>> > The sudo rules are:<br>> > # ipa sudorule-find<br>> > --------------------<br>> > 2 Sudo Rules matched<br>> > --------------------<br>> >   Rule name: sudo-host1<br>> >   Enabled: TRUE<br>> >   Command category: all<br>> >   RunAs User category: all<br>> >   User Groups: host1-rw<br>> >   Host Groups: host1<br>> >   Sudo Option: -authenticate<br>> > <br>> > <br>> >   Rule name: sudo-host2<br>> >   Enabled: TRUE<br>> >   User Groups: host2-rw<br>> >   Host Groups: host2<br>> >   Sudo Option: -authenticate<br>> > ----------------------------<br>> > Number of entries returned 2<br>> > ----------------------------<br>> > <br>> > <br>> > When a user in user group host1-rw sshs to a client in host group<br>> > host1 and runs "sudo su -" the user gets prompted for a password even<br>> > though the sudo option -authenticate is set.<br>> > I'm not convinced that sudo is even attempting to use sssd, but I'm<br>> > not sure how to confirm this.<br>> > <br>> > <br>> > I have seen some references to /etc/sudo-ldap.conf in online<br>> > discussions of similar issues. This file exists on my client, but<br>> > everything is commented out. Do I need to put the ldap client<br>> > configuration in /etc/sudo-ldap.conf as well as /etc/sssd/sssd.conf<br>> > for CentOS 6.3 clients?<br>> > <br>> > <br>> > Any ideas about how to work out what is failing?<br>> > <br>> > <br>> > Chris<br>> > <br>> try "!authenticate" (without the quotes), not  "-authenticate" (again,<br>> no quotes).<br>That made no difference (though I think you're correct that -authenticate is wrong).</div><div><br></div><div>Chris<br><br></div>                                          </div></body>
</html>