<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Arial","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
my 2 cents, <br>
<br>
2 possibilities,<br>
<br>
1) There should I think be a HBAC rule and a sudo rule pair, I think you need both.  For the HBAC rule with limited permissions you need the sudo privaledge and access say ssh and /or login,  so at least 2, so when you say "1" it might be that? I dont know
 how you are getting access, it sounds possible.<br>
<br>
2) or you have the bug I have it looks possible as well,<br>
<br>
Are you putting the host into a host group and using that host group in the sudo rule?<br>
<br>
There is a bug that stops that working, so in the sudo rule delete the host group and add the server server/host itself and see if that works.<br>
<br>
If so you have the bug, I find deleting the HBAC and sudo rules and starting again from scratch sometimes works, sometimes doesnt.  I have 30~50% of my sudo rules with individial hosts and not groups because of this.<br>
<br>
If your problem is like mine, and you have RH support on RHEL?  then raise a case, my one is #6963677 so I'd ask for it to be linked but its been open since August.<br>
<br>
:/<br>
<div><br>
<div style="font-family: Tahoma; font-size: 13px;">
<p>regards</p>
<p>Steven Jones</p>
<p>Technical Specialist - Linux RHCE</p>
<p>Victoria University, Wellington, NZ</p>
<p>0064 4 463 6272<br>
</p>
</div>
</div>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF400787"><font color="#000000" face="Tahoma" size="2"><b>From:</b> freeipa-users-bounces@redhat.com [freeipa-users-bounces@redhat.com] on behalf of Macklin, Jason [jason.macklin@roche.com]<br>
<b>Sent:</b> Tuesday, 16 October 2012 9:34 a.m.<br>
<b>To:</b> freeipa-users@redhat.com<br>
<b>Subject:</b> [Freeipa-users] Sudo works for full access, but not on a per command or host level.<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">Hi,</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">I apologize up front if this is obvious, but I’m having issues configuring sudo privileges. 
</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">I currently have an IPA server running FreeIPA 2.2 with sudo configured for our administrators on all hosts.  This works fantastic!  As soon as I attempt to configure a more
 specific sudo rule it does not work.  In my troubleshooting, I have noticed that from the same host my admin level privileges work, but with another user account setup to just run one command, it fails.  I have turned on sudo debugging and the only thing I
 can find that looks out of sorts is the following:</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">sudo: host_matches=0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">As soon as I move the user account that is failing into the admin group it starts to work.
</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">I have attempted every iteration of sudo configuration on the server that I can think of.  I have setup HBAC and given that a shot as well.  At this point I’m completely
 stumped and would appreciate any help that I can get!</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">Thank you in advance for your assistance,</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: "Arial","sans-serif";">Jason</span></p>
</div>
</div>
</div>
</div>
</body>
</html>