Due to some unfortunate events I ended up with a broken pam library on a VM I am running. Everything else worked just fine .. except that login of course (so a bit of an issue if you need to do stuff like update letsencrypt certificates quickly cuz you forgot and are on holiday...
In th end I did just use VNC to access the server, reboot it, and copy the certificates where they need to be after mounting the LVM Volume directly on the host (the VM uses a raw LVM volume for data storage - fortunately, which made it really easy to get the new certificates to the VM) then just reboot it with
init=/bin/sh and copy the certificates where they need to be .. and holiday can continue..(after a few reboots since I accidentally had copied the symlinks certbot creates first time XD)
Been thinking of how to fix this the easiest way .. At first I considered updating pam from the single-user env booted before, but there are just too many issues (proc, dev,..) more effort than it is worth it .. turned out it is easier than thought .. since the system booted just fine otherwise I just (ab-)used Gentoos local service, which starts scripts placed in /etc/local.d on bootup. just a quick script in there to emerge pam and after it was done login worked fine again.Share on Twitter Share on Facebook