<div dir="ltr"><div dir="ltr">On Tue, May 5, 2020 at 1:19 AM Andy Pieters <<a href="mailto:systemd@andypieters.me.uk">systemd@andypieters.me.uk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 4 May 2020 at 23:11, Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div></div></div><div dir="auto">So this is basically for implementing sudo-like caching for 2FA?</div><div dir="auto"><br></div></div></blockquote><div><br></div><div>Yes that's exactly it.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto">What authentication methods are involved here?</div></div></blockquote><div><br></div><div>Using yubikey + password when 2F is active, using hostkey when not</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Seems like there are better ways than a service file that permanently modifies /etc/group in the first place... Like a PAM module that literally touches a timestamp file.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div></div></div></blockquote></div></div></div></blockquote><div>OK that sounds promising. I had thought of systemd angle first and am not that familiar with pam </div><div>I found <a href="https://linux.die.net/man/8/pam_timestamp" target="_blank">https://linux.die.net/man/8/pam_timestamp</a> is that what you meant?</div></div></div></blockquote><div><br></div><div>That kind of module is exactly what I meant, yes.</div><div><br></div><div>I would guess you can use it something like this:</div><div><font face="monospace">auth requisite pam_unix</font></div><div><font face="monospace">auth [success=1 default=ignore] pam_timestamp</font></div><div><font face="monospace">auth requisite pam_yubikey</font></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>