Quickly bounce nic over ssh without losing ssh session

The story

If you make changes to a network card settings and need to restart it to take effect, you might find this useful.
Ssh is resilient enough to usually keep your session if you take the card down and up fast enough. Obviously you want to make sure the change you make will not prevent the card from being enabled correctly. I was making changes to my dns settings for the card, and I wanted them to take effect immediately.

The snippet

echo "ifdown eth0; sleep 2; ifup eth0;" > ~/foo.sh; chmod u+x ~/foo.sh; ~/foo.sh

Freeipa client uninstall and reinstall

If you are changing ipa domains on a client, you first uninstall the client.

ipa-client-install --uninstall

Then you install in the new domain. (The lack of options here indicates it will search dns, so make sure your _kerberos entries are correct!)

ipa-client-install --mkhomedir --force-ntpd --enable-dns-updates

If you have problems with user accounts on the client for the new domain, it’s possible you need to manually clear out the sss cache to remove traces of the old domain.

rm -rf /var/lib/sss/db/*
systemctl restart sssd.service



  1. https://serverfault.com/questions/582854/how-to-reset-keytab-for-freeipa-server-and-client#583319

Disabling firefox detect captive portal


While working on a dns server on my virtual network, I was tailing the named logs in journald, and I saw a request go through:


I thought to myself, “What is that?” I ddged it and found that was a function in firefox that tries to detect if it’s in a captive portal, like at a hotel or other public wifi where you must agree to something before you can access the World Wide Web.
I realize that it is probably fine for firefox to do this, but it’s not necessary. I don’t want my browser doing anything of the sort. I will tell what and when to visit web URLs.

Disabling firefox detect captive portal

In firefox, visit about:config and search for captive.
You can change the values. The easiest one to change is the network.captive-portal-service.enabled. You can change this boolean value to false by double-clicking it.



  1. https://bugzilla.mozilla.org/show_bug.cgi?id=1307867

KDE always show keyboard underscores


I like to use the keyboard to interact with my computer, even in the gui. On my KDE system, I wanted my accelerator keys to always be visible. I had to poke around the World Wide Web for a while to find out exactly how to do that. These instructions are valid for kdelibs 6:4.14.30-1.fc25.

KDE always show accelerator keys

  • Open up “System Settings” application.
  • Select “Application Style.”
  • Select “Widget Style” tab.
  • Select “Configure…” button beside Widget style.
  • Adjust “Keyboard accelerators visibility” to “Always show keyboard”



  1. Instructions for an older version of kde https://ubuntuforums.org/showthread.php?t=1384425