An HBAC extension would certainly be appreciated.  I'm not sure how other organizations are setup but in our environment we don't give shell access unless absolutely necessary and we use a lot of SSH tunneling with target services bound to localhost.  If I can figure out the correct syntax to get the perl command added to the users public key in IPA (as Honza suggested) then that will provide a work around for the time being.  Ultimately it would be awesome to have the same level of granularity that the local authorized_keys file allowed while reaping the benefits of centralized management.<br>
<br>Albert<br><br><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 9:36 AM, Simo Sorce <span dir="ltr"><<a href="mailto:simo@redhat.com" target="_blank">simo@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, 2012-12-17 at 09:07 -0500, Albert Adams wrote:<br>
> Thank you for the responses.  I was initially attempting to set this<br>
> value via the web UI and if I entered anything other than the hash<br>
> value of the user's public key it would get rejected.  After thinking<br>
> about your response I realize that I really need to determine a method<br>
> of doing this via a HBAC rule.  If I accomplish this with<br>
> authorized_keys then the user is restricted across the board and would<br>
> not be able to gain a shell on any system whereas HBAC would allow me<br>
> to restrict thier access as needed.  We currently require users to<br>
> tunnel over SSH to gain access to certain sensitive web apps (like<br>
> Nessus) but those same users have shell access on a few boxes.<br>
> Thoughts??<br>
<br>
</div>One thing you could do is to use the override_shell parameter in sssd.<br>
However this one would override the shell for all users so just<br>
putting /sbin/nologin there would not work if you need some users to be<br>
able to log in (if you care only for root logins it would be enough).<br>
<br>
However you can still manage to use it to point to a script that would<br>
test something like whether the user belongs to a group or not, and if<br>
so run either /bin/bash or /bin/nologin<br>
<br>
This seem like a nice feature request for FreeIPA though, maybe we can<br>
extend HBAC to allow a special option to define a shell, maybe creating<br>
a special 'shell' service that sssd can properly interpret as a hint to<br>
set nologin vs the actual shell.<br>
<br>
Dmitri, should we open a RFE on this ?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Simo.<br>
<br>
--<br>
Simo Sorce * Red Hat, Inc * New York<br>
<br>
</font></span></blockquote></div><br>