<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06/06/2012 01:59 PM, Joe Linoff wrote:
<blockquote
cite="mid:8AD4194C251EC74CB897E261038F447801005C9F@mantaray.tabula.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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]-->
<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 moz-do-not-send="true"
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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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: 0.5in;"><span
style="font-size: 10pt; 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>
</div>
</blockquote>
<br>
Looks like sudo utility is not going over the ldap and tries to find
user in the local file.<br>
Can you bind to the ldap server? Is firewall port open?<br>
<br>
<br>
<blockquote
cite="mid:8AD4194C251EC74CB897E261038F447801005C9F@mantaray.tabula.com"
type="cite">
<div class="WordSection1">
<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: 10pt; font-family:
"Courier New";"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># CITATION: <a moz-do-not-send="true"
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: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># Update /etc/nsswitch.conf</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">cat</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">>/etc/nsswitch.conf <<EOF</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># FreeIPA sudo support</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">sudoers: files ldap</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">sudoers_debug: 1</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">EOF</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># Insert this just after the ipa_server line and
restart sssd:</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># ldap_netgroup_search_base =
cn=ng,cn=compat,dc=foo,dc=example,dc=com</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">cat</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">/etc/sssd/sssd.conf | \</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">awk</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; 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: 12pt; font-family: "Times New
Roman","serif";"> </span><span
style="font-size: 10pt; font-family: "Courier
New";">>/tmp/x</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">cp</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">/tmp/x</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> </span><span
style="font-size: 10pt; font-family: "Courier
New";">/etc/sssd/sssd.conf</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">rm</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">-f /tmp/x</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">service sssd restart</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># Create the /etc/nslcd.conf file</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">ls</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">/etc/nslcd.conf</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">cat</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";">
</span><span style="font-size: 10pt; font-family:
"Courier New";">>/etc/nslcd.conf <<EOF</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">binddn
uid=sudo,cn=sysaccounts,cn=etc,dc=foo,dc=example,dc=com</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">bindpw pwd/sudo</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">ssl start_tls</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">tls_cacertfile /etc/ipa/ca.crt</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">tls_checkpeer yes</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">bind_timelimit 5</span><span style="font-size:
12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">timelimit 15</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">uri <a class="moz-txt-link-freetext" href="ldap://cuthbert.foo.example.com">ldap://cuthbert.foo.example.com</a></span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">sudoers_base ou=SUDOers,dc=foo,dc=example,dc=com</span><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">EOF</span><span style="font-size: 12pt;
font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 12pt; font-family: "Times New
Roman","serif";"> <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";"># Set the NIS domain name (even though NIS is
not used)</span><span style="font-size: 12pt; font-family:
"Times New Roman","serif";"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">#
================================================================<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><span
style="font-size: 10pt; font-family: "Courier
New";">nisdomainname foo.example.com</span><span
style="font-size: 12pt; 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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Freeipa-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-users@redhat.com">Freeipa-users@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thank you,
Dmitri Pal
Sr. Engineering Manager IPA project,
Red Hat Inc.
-------------------------------
Looking to carve out IT costs?
<a class="moz-txt-link-abbreviated" href="http://www.redhat.com/carveoutcosts/">www.redhat.com/carveoutcosts/</a>
</pre>
</body>
</html>