<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 7, 2014, at 7:56 PM, Trevor Vaughan &lt;<a href="mailto:tvaughan@onyxpoint.com">tvaughan@onyxpoint.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr">Josh,<div><br></div><div>I haven't seen this happening.</div><div><br></div><div>Do you happen to have a cron job that is trying to do something with sudo or su?</div><div><br></div><div>Trevor</div></div>
<div class="gmail_extra"><br></div></blockquote><div><br></div>Unfortunately I don’t. &nbsp;Could you post your /etc/pam.d/cron file?</div><div><br></div><div>Thanks,</div><div>-josh</div><div><br><blockquote type="cite"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 12:58 PM, Josh Kayse <span dir="ltr">&lt;<a href="mailto:Joshua.Kayse@gtri.gatech.edu" target="_blank">Joshua.Kayse@gtri.gatech.edu</a>&gt;</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 01/27/2014 12:49 PM, Shawn Wells wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 1/27/14, 12:38 PM, Josh Kayse wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Per the RHEL6 Guide I have configured my system to utilize faillock<br>
and lastlog. &nbsp;Now I have found that cron no longer works.<br>
<br>
I have tracked it down to being an SELinux problem. &nbsp;crond_t is trying<br>
to read/write lastlog_t and faillog_t files. &nbsp;Has anyone else run in<br>
to this problem or have recommendations?<br>
<br>
My findings so far have shown that cron requires auth, account, and<br>
session from password-auth. &nbsp;Inside password-auth we have the<br>
appropriate faillock/lastlog lines in auth/account/session.<br>
<br>
Previously we have put the faillock/lastlog lines in the individual<br>
services that users can use to access the system (gdm, sshd, login,<br>
etc) but this was not compliant with the SSG/STIG.<br>
<br>
Should we go back to placing these lines in the individual services or<br>
grant the permission to crond_t? &nbsp;Could this be because we disable the<br>
unconfined domain?<br>
</blockquote>
<br>
Happen to be sitting next to Dan Walsh.... he says:<br>
<br>
"If a restorecon doesn't fix the problem, have them open a ticket. Even<br>
with unconfined disabled type enforcement should grant cron_t<br>
applications access to write logs"<br>
<br>
</blockquote>
<br></div>
Sadly, restorecon doesn't fix the problem.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, with that said, what happens after you:<br>
restorecon /var/log/&lt;yourfile&gt;<br>
</blockquote>
<br></div>
Nothing. &nbsp;I ran it on /var/run/faillock (the default for faillock) and /var/log/lastlog and no changes were made by restorecon and cron still cannot access the files.<br>
<br>
/var/log/lastlog -&gt; lastlog_t file<br>
/var/run/faillock -&gt; faillog_t directory<br>
/var/run/faillock/* -&gt; faillog_t file, one per user<br>
<br>
In general though, I don't think this should be a SELinux problem. &nbsp;Does it make sense for cron to update lastlog or faillock for a user? &nbsp;Seems like that would make it possible for someone to circumvent lastlog/faillock by simply creating a personal cron job that fires off every minute.<div class="HOEnZb">
<div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
scap-security-guide mailing list<br>
<a href="mailto:scap-security-guide@lists.fedorahosted.org" target="_blank">scap-security-guide@lists.<u></u>fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide" target="_blank">https://lists.fedorahosted.<u></u>org/mailman/listinfo/scap-<u></u>security-guide</a><br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
-josh<br>
<br>
-- <br>
<a href="tel:404.407.6630" value="+14044076630" target="_blank">404.407.6630</a><br>
<br>
</font></span><br>_______________________________________________<br>
scap-security-guide mailing list<br>
<a href="mailto:scap-security-guide@lists.fedorahosted.org">scap-security-guide@lists.fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide" target="_blank">https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Trevor Vaughan<br>Vice President, Onyx Point, Inc<br>(410) 541-6699<br><a href="mailto:tvaughan@onyxpoint.com">tvaughan@onyxpoint.com</a><br><br>-- This account not approved for unencrypted proprietary information --
</div>
_______________________________________________<br>scap-security-guide mailing list<br><a href="mailto:scap-security-guide@lists.fedorahosted.org">scap-security-guide@lists.fedorahosted.org</a><br>https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide<br></blockquote></div><br></body></html>