From a1b77e2a44e1856e351e5637055c9610386318fb Mon Sep 17 00:00:00 2001 From: James Hogarth Date: Nov 21 2014 20:33:43 +0000 Subject: el6.6 configures sudo in ipa-client-install/ipa-server-install but el7 does not so need to be configured manually --- diff --git a/tests/p_ipa-server/7-addsudo.sh b/tests/p_ipa-server/7-addsudo.sh index 011cbe5..5d6b8ee 100755 --- a/tests/p_ipa-server/7-addsudo.sh +++ b/tests/p_ipa-server/7-addsudo.sh @@ -51,6 +51,15 @@ t_CheckExitStatus $? echo "$sudodetails" | grep 'Users: ipatestuser' &> /dev/null t_CheckExitStatus $? +# EL6.6 auto configures sudo but 7 does not +if t_GetPkgRel basesystem | grep -q el7 +then +t_Log "Running $0 - test adding sudo configuration" +echo "sudoers: files sss" >> /etc/nsswitch.conf +sed -i 's/services = nss, pam, ssh/services = nss, pam, ssh, sudo/' /etc/sssd/s +sed -i 's/id_provider = ipa/id_provider = ipa\nsudo_provider = ldap\nldap_sudo_search_base = ou=sudoers,dc=c6ipa,dc=local\nldap_sasl_mech = GSSAPI/' /etc/sssd/sssd.conf +fi + t_Log "Running $0 - clearing the sssd cache" /sbin/service sssd stop &> /dev/null rm -rf /var/lib/sss/db/*