<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fix on Benjamin Italiaander</title><link>https://tlnd.org/genre/fix/</link><description>Recent content in Fix on Benjamin Italiaander</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 01 Oct 2025 12:30:21 +0100</lastBuildDate><atom:link href="https://tlnd.org/genre/fix/index.xml" rel="self" type="application/rss+xml"/><item><title>YubiKey 8 — Troubleshooting</title><link>https://tlnd.org/Linux/yubikey/08_troubleshooting/</link><pubDate>Wed, 01 Oct 2025 12:30:21 +0100</pubDate><guid>https://tlnd.org/Linux/yubikey/08_troubleshooting/</guid><description>&lt;h1 id="8-troubleshooting"&gt;8. Troubleshooting&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://tlnd.org/Linux/yubikey/07_linux_login_pam/"&gt;← 7. Linux login&lt;/a&gt; · &lt;a href="https://tlnd.org/Linux/yubikey/"&gt;Overview&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="-quick-checks"&gt;🧪 Quick checks&lt;/h2&gt;
&lt;p&gt;Run these first — they tell you where the problem is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;lsusb &lt;span class="p"&gt;|&lt;/span&gt; grep -i yubi &lt;span class="c1"&gt;# is the key on USB?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl status pcscd.socket &lt;span class="c1"&gt;# is the smartcard daemon running?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ykman info &lt;span class="c1"&gt;# can ykman talk to it?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --card-status &lt;span class="c1"&gt;# can GnuPG talk to it?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg -K &lt;span class="c1"&gt;# ssb&amp;gt; = subkey on the YubiKey&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$SSH_AUTH_SOCK&lt;/span&gt; &lt;span class="c1"&gt;# which SSH agent is used?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh-add -L &lt;span class="c1"&gt;# which keys does the agent offer?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh -vvv host &lt;span class="c1"&gt;# what happens during login?&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="the-yubikey-is-not-found"&gt;The YubiKey is not found&lt;/h2&gt;
&lt;h3 id="gpg---card-status--no-such-device--card-not-present"&gt;&lt;code&gt;gpg --card-status&lt;/code&gt; → &lt;em&gt;No such device&lt;/em&gt; / &lt;em&gt;Card not present&lt;/em&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Is &lt;code&gt;pcscd&lt;/code&gt; running?
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; --now pcscd.socket
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Restart scdaemon:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpgconf --kill scdaemon
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --card-status
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Let scdaemon use &lt;code&gt;pcscd&lt;/code&gt; instead of its own USB driver — add to &lt;code&gt;~/.gnupg/scdaemon.conf&lt;/code&gt;:
&lt;pre tabindex="0"&gt;&lt;code class="language-conf" data-lang="conf"&gt;disable-ccid
&lt;/code&gt;&lt;/pre&gt;then &lt;code&gt;gpgconf --kill scdaemon&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fedora:&lt;/strong&gt; &lt;em&gt;access denied&lt;/em&gt; from polkit → add the polkit rule from &lt;a href="https://tlnd.org/Linux/yubikey/01_installation/#step-4--polkit-rule-only-if-you-get-access-denied--no-such-device"&gt;1.2 step 4&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="ykman-works-but-gpg-doesnt-or-the-other-way-around"&gt;&lt;code&gt;ykman&lt;/code&gt; works but &lt;code&gt;gpg&lt;/code&gt; doesn&amp;rsquo;t (or the other way around)&lt;/h3&gt;
&lt;p&gt;Only one program can hold the card at a time. Kill the other one:&lt;/p&gt;</description></item><item><title>Fetchmail OpenSSL error</title><link>https://tlnd.org/Linux/fetchmail/openSSL_and_Fetchmail_part1/</link><pubDate>Wed, 24 Aug 2022 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/fetchmail/openSSL_and_Fetchmail_part1/</guid><description>&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Old method.&lt;/strong&gt; Current fetchmail versions check the full certificate instead of an MD5 fingerprint, see &lt;a href="https://tlnd.org/Linux/fetchmail/openSSL_and_Fetchmail_part2/"&gt;part 2&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="fetchmail-openssl-reported-error"&gt;Fetchmail OpenSSL reported error&lt;/h1&gt;
&lt;p&gt;If you get an OpenSSL error with fetchmail, generate an MD5 fingerprint of the server certificate to validate the OpenSSL connection, and add it to your &lt;code&gt;~/.fetchmailrc&lt;/code&gt; file. Also make sure you have an up-to-date version of OpenSSL installed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Generate the MD5 fingerprint&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;openssl s_client -connect imap.example.com:993 &amp;lt;/dev/null 2&amp;gt;/dev/null &lt;span class="p"&gt;|&lt;/span&gt; openssl x509 -fingerprint -noout -md5 -in /dev/stdin
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Add these lines, with your generated fingerprint, to your ~/.fetchmailrc file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssl
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sslfingerprint &lt;span class="s2"&gt;&amp;#34;01:02:03:04:05:06:07:08:09:10:11:12:13:14:15:FF&amp;#34;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Your config should end up looking something like this:&lt;/p&gt;</description></item><item><title>Fetchmail OpenSSL error, part 2</title><link>https://tlnd.org/Linux/fetchmail/openSSL_and_Fetchmail_part2/</link><pubDate>Wed, 24 Aug 2022 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/fetchmail/openSSL_and_Fetchmail_part2/</guid><description>&lt;h1 id="fetchmail-openssl-error-part-2"&gt;Fetchmail OpenSSL error, part 2&lt;/h1&gt;
&lt;p&gt;In the past, fetchmail only required the MD5 fingerprint of an SSL certificate for validation. Since Fedora 36, fetchmail requires the complete certificate chain and &lt;code&gt;c_rehash&lt;/code&gt; links of the certificates.&lt;/p&gt;
&lt;p&gt;You can set this up with the following steps.&lt;/p&gt;
&lt;h2 id="get-the-domain-certificate"&gt;Get the domain certificate&lt;/h2&gt;
&lt;p&gt;Save the domain certificate somewhere. In this example we create a folder inside the home folder and save it there.&lt;/p&gt;
&lt;p&gt;(Replace &lt;code&gt;sub.domain.tld:993&lt;/code&gt; with your own server address, and &lt;code&gt;sub_domain_tld.cert&lt;/code&gt; with a filename that works for you.)&lt;/p&gt;</description></item><item><title>Keyboard not working on Fujitsu Lifebook on Fedora 36</title><link>https://tlnd.org/Linux/fedora/Keyboard_not_working_on_Fujitsu_Lifebook_on_Fedora/</link><pubDate>Fri, 19 Aug 2022 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/fedora/Keyboard_not_working_on_Fujitsu_Lifebook_on_Fedora/</guid><description>&lt;p&gt;After installing Fedora Linux 36 on my Fujitsu Lifebook U7410, the keyboard stopped working. I fixed it by editing the GRUB configuration.&lt;/p&gt;
&lt;p&gt;Add the following line at the bottom of &lt;code&gt;/etc/default/grub&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GRUB_CMDLINE_LINUX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$GRUB_CMDLINE_LINUX&lt;/span&gt;&lt;span class="s2"&gt; i8042.reset i8042.nomux i8042.nopnp i8042.noloop&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After editing the file, regenerate the GRUB configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;grub2-mkconfig -o &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;readlink -e /etc/grub2.cfg&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now reboot.&lt;/p&gt;
&lt;h2 id="easier-on-current-fedora-grubby"&gt;Easier on current Fedora: grubby&lt;/h2&gt;
&lt;p&gt;Fedora&amp;rsquo;s own tool adds kernel options to every installed kernel, without editing files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo grubby --update-kernel&lt;span class="o"&gt;=&lt;/span&gt;ALL --args&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;i8042.reset i8042.nomux i8042.nopnp i8042.noloop&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo grubby --info&lt;span class="o"&gt;=&lt;/span&gt;DEFAULT &lt;span class="c1"&gt;# check the &amp;#34;args&amp;#34; line&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To remove them again: &lt;code&gt;sudo grubby --update-kernel=ALL --remove-args=&amp;quot;i8042.reset i8042.nomux i8042.nopnp i8042.noloop&amp;quot;&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>GnuPG</title><link>https://tlnd.org/Linux/GnuPG/</link><pubDate>Fri, 01 Jan 2021 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/GnuPG/</guid><description>&lt;h1 id="the-gnu-privacy-guard"&gt;The GNU Privacy Guard&lt;/h1&gt;
&lt;p&gt;How to encrypt and decrypt a file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# encrypt a file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg -e -r someone@domain.tld file-to-encrypt.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# decrypt a file&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg -d -o secrets.txt file-to-encrypt.txt.gpg
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# encrypt with a password only (no keys needed)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg -c file-to-encrypt.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# sign a file, and check a signature&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --detach-sign file.tar.gz &lt;span class="c1"&gt;# creates file.tar.gz.sig&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gpg --verify file.tar.gz.sig file.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="gpg-error-unusable-public-key"&gt;GPG Error: Unusable Public Key&lt;/h2&gt;
&lt;p&gt;If you encounter the following error:&lt;/p&gt;</description></item><item><title>Connect to a Cisco switch with SSH</title><link>https://tlnd.org/Linux/ssh/cisco/</link><pubDate>Mon, 20 Apr 2020 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/ssh/cisco/</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;
&lt;p&gt;I got this error message when I tried to log in to my Cisco switch with SSH.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cisco&lt;/strong&gt;: SSH fails to connect&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Unable to negotiate with [hostname or ip] port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can solve this by explicitly allowing the old key exchange method:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ssh -o &lt;span class="nv"&gt;KexAlgorithms&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;+diffie-hellman-group1-sha1 &lt;span class="o"&gt;[&lt;/span&gt;hostname or ip&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;⚠️ These SHA-1 algorithms are outdated and insecure. Only use them for old network equipment, ideally on a management network.&lt;/p&gt;</description></item><item><title>Firefox Already Running</title><link>https://tlnd.org/Linux/firefox/</link><pubDate>Sat, 17 Sep 2016 00:00:00 +0000</pubDate><guid>https://tlnd.org/Linux/firefox/</guid><description>&lt;h1 id="firefox-is-already-running"&gt;Firefox is already running&lt;/h1&gt;
&lt;p&gt;If you try to open Firefox and get the message &lt;em&gt;&amp;ldquo;Firefox is already running&amp;rdquo;&lt;/em&gt;, close all Firefox windows and try this script. It removes the leftover lock files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;find ~/.mozilla -name &lt;span class="s2"&gt;&amp;#34;*lock&amp;#34;&lt;/span&gt; -print0 &lt;span class="p"&gt;|&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; -r -d &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt; file&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;removing &lt;/span&gt;&lt;span class="nv"&gt;$file&lt;/span&gt;&lt;span class="s2"&gt;...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; rm &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$file&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Make sure Firefox is really closed first (&lt;code&gt;pgrep -a firefox&lt;/code&gt; shows nothing).&lt;/p&gt;
&lt;p&gt;The script only looks in &lt;code&gt;~/.mozilla&lt;/code&gt;. Depending on how Firefox is installed, the profile can also be in:&lt;/p&gt;</description></item></channel></rss>