<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Folks:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am trying to configure sudo clients using FreeIPA 2.1.3 on CentOS 6.2 but it I am running into a problem that I do not know how to debug. I used the instructions provided here: <a href="http://docs.fedoraproject.org/en-US/Fedora/15/html/FreeIPA_Guide/example-configuring-sudo.html">http://docs.fedoraproject.org/en-US/Fedora/15/html/FreeIPA_Guide/example-configuring-sudo.html</a>. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The server installation went fine and I even did a sudo client installation on the server which worked well. Unfortunately, when I did the same client setup on another host in the network I got the message: <user> not in sudoers files when I tried to execute a command.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here is the output from /var/log/secure on the client. I didn’t see anything strange on the server. The user name is bigbob.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:38:35 docs unix_chkpwd[8737]: password check failed for user (bigbob)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:38:35 docs sudo: pam_unix(sudo:auth): authentication failure; logname=bigbob uid=0 euid=0 tty=/dev/pts/2 ruser=bigbob rhost=  user=bigbob<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:38:36 docs sudo: pam_sss(sudo:auth): authentication success; logname=bigbob uid=0 euid=0 tty=/dev/pts/2 ruser=bigbob rhost= user=bigbob<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:38:36 docs sudo:   bigbob : user NOT in sudoers ; TTY=pts/2 ; PWD=/home/bigbob ; USER=root ; COMMAND=/bin/ls<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:44:09 docs unix_chkpwd[8767]: password check failed for user (bigbob)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:44:09 docs sudo: pam_unix(sudo:auth): authentication failure; logname=bigbob uid=0 euid=0 tty=/dev/pts/2 ruser=bigbob rhost=  user=bigbob<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:44:10 docs sudo: pam_sss(sudo:auth): authentication success; logname=bigbob uid=0 euid=0 tty=/dev/pts/2 ruser=bigbob rhost= user=bigbob<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>Jun  6 10:44:10 docs sudo:   bigbob : user NOT in sudoers ; TTY=pts/2 ; PWD=/home/bigbob ; USER=root ; COMMAND=/bin/pwd<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The command “/bin/pwd” is in the sudo commands and in the sudo command group.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any help would be greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here are the setup steps that I performed on the client. The domain is foo.example.com.<o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># CITATION: <a href="http://docs.fedoraproject.org/en-US/Fedora/15/html/FreeIPA_Guide/example-configuring-sudo.html">http://docs.fedoraproject.org/en-US/Fedora/15/html/FreeIPA_Guide/example-configuring-sudo.html</a> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># Update /etc/nsswitch.conf</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>cat</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>>/etc/nsswitch.conf <<EOF</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># FreeIPA sudo support</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>sudoers:  files ldap</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>sudoers_debug: 1</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>EOF</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># Insert this just after the ipa_server line and restart sssd:</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ldap_netgroup_search_base = cn=ng,cn=compat,dc=foo,dc=example,dc=com</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>cat</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>/etc/sssd/sssd.conf | \</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>awk</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>'{print $0;if($1=="ipa_server"){printf("ldap_netgroup_search_base = cn=ng,cn=compat,dc=foo,dc=example,dc=com\n");}}'</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>>/tmp/x</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>cp</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>/tmp/x</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>/etc/sssd/sssd.conf</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>rm</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>-f /tmp/x</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>service sssd restart</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># Create the /etc/nslcd.conf file</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>ls</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>/etc/nslcd.conf</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>cat</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>>/etc/nslcd.conf <<EOF</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>binddn uid=sudo,cn=sysaccounts,cn=etc,dc=foo,dc=example,dc=com</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>bindpw pwd/sudo</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>ssl start_tls</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>tls_cacertfile /etc/ipa/ca.crt</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>tls_checkpeer yes</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>bind_timelimit 5</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>timelimit 15</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>uri ldap://cuthbert.foo.example.com</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>sudoers_base ou=SUDOers,dc=foo,dc=example,dc=com</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>EOF</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># Set the NIS domain name (even though NIS is not used)</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'># ================================================================<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Courier New"'>nisdomainname foo.example.com</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Joe<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>