<div dir="ltr">Hi there,<div><br></div><div>Just want some help with setting credentials for systemd-cryptsetup@.service services.</div><div><br></div><div>I have a crypttab file with the following:</div><div><br></div><div>(I set a label for this volume with a udev rule as I have to use a label)</div><div><br></div><div>os_crypt  LABEL=os_luks  none    try-empty-password=1,luks,<code style="color:rgb(0,0,0)">pkcs11-uri=<font face="Times">auto</font></code>,discard</div><div><br></div><div>I read in the systemd-cryptsetup documentation that I should be able to pass credential "<span style="color:rgb(0,0,0);font-family:monospace">cryptsetup.pkcs11-pin"</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">I couldn't figure out from the documentation how to do this.</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">I assume I create a drop-in for systemd-cryptsetup@os_crypt.service</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">and add the credential there:</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">LoadCredential=cryptsetup.pkcs11-pin:/path/to/unix/socket</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">Would that work? If not, how would I go about passing a pkcs11 pin to cryptsetup.</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">I know I can manually do it like this:</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div> PIN=4321 systemd-cryptsetup attach os-crypt /dev/sdb - pkcs11-uri=auto but I want to use the generator with crypttab.</div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace">Thanks,</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium"><br>David.</span></div></div>