You are not logged in.
Hello all,
Ages ago (nearly two years now), I followed the wiki's suggestion to encrypt network profiles using systemd-creds.
Recently, thanks to the changes with mkinitcpio and systemd-pcrosseparator.service, if I upgrade to mkinitcpio v42 I have no internet. iwd actually fails to load entirely:
Sep 20 13:21:52 Marojejy systemd-creds[1170]: TPM policy does not match current system state. Either system has been tampered with or policy out-of-date: Operation not permitted
Sep 20 13:21:52 Marojejy (iwd)[1138]: iwd.service: Unexpected TPM PCR state of the system.
Sep 20 13:21:52 Marojejy (iwd)[1138]: iwd.service: Failed to set up credentials: Structure needs cleaning
Sep 20 13:21:52 Marojejy (iwd)[1138]: iwd.service: Failed at step CREDENTIALS spawning /usr/lib/iwd/iwd: Structure needs cleaning
Sep 20 13:21:52 Marojejy systemd[1]: iwd.service: Main process exited, code=exited, status=243/CREDENTIALS
Sep 20 13:21:52 Marojejy systemd[1]: iwd.service: Failed with result 'exit-code'.
Sep 20 13:21:52 Marojejy systemd[1]: Failed to start Wireless service.Most of the hastily put-together tutorials on how to fix your system after the TPM key changes deal with setups where the TPM key is used to unlock a LUKS volume (which is reasonable as that's by far the most common use case). However none of it seems very applicable to my situation.
It is my impression that I have to decrypt my network profiles, then re-do the process. On kernel.org there is a page supposedly explaining the process. Unfortunately this depends on iwd-decrypt-profile and this tool is not included in my install; it is available in a git repository only in C program form and I am not familiar enough with C compilation to get it to compile. Even re-compiling iwd with the --enable-tools option which would seem to have been made for this purpose doesn't seem to do anything. There is a cryptic comment on the iwd README page regarding --enable-tools:
"This enables building of all utilities that are however
not installed and only useful during development."
Why in the world would you have an option that doesn't install anything? Is it common practice to provide off-by-default build time options that don't do anything at run time? Admittedly I don't often mess with compilation options (the occasional suckless program mainly).
My Plan B is just to accept that all my profiles will soon be lost forever and re-do the encryption process as I am already planning to buy a new router at the start of next week. Still it would be nice if I could find a way to save them.
If anyone else had tried this setup and is dealing with the same issue I would love to hear solutions. Or at least commiserate. I figure that getting iwd-decrypt-profile.c to compile is probably easy enough and would warrant a thread in Newbie Corner, but am posting here in case any of my assumptions are very wrong for a seemingly uncommon case.
Last edited by mesaprotector (Today 04:39:56)
Offline
I've never done this before but I'm guessing 2 options:
1. Downgrade mkinitcpio (to restore the old PCRs) and "systemd-creds decrypt /etc/credstore.encrypted/iwd-secret.cred"
2. The wiki says:
# systemd-ask-password -n | systemd-creds --tpm2-device=auto --name=iwd-secret encrypt - /etc/credstore.encrypted/iwd-secret.credDoesn't this just encrypt a password you typed? If you know the password you might be able to just give iwd that somehow.
Last edited by Beemo (Today 05:06:28)
Offline
That is indeed a way to get the password back, but as far as I am aware the only way to give iwd the password is iwd-decrypt-profile, which I don't know how to compile.
Offline