Waiting for server to accept SSH connections

Sometimes you need to wait for a just booted server to accept SSH connections. This can be solved with a one-line bash script: until nc -w 10 -z $SERVER_IP 22; do echo "SSH not available" && sleep 5; done

October 22, 2016 · 1 min

npm install fails with "npm ERR! tar.unpack untar error"

Problem npm failed randomly while installing packages. It didn’t matter which packages or if running on Debian itself or inside virtual machines using Ubuntu (vagrant). Upgrading npm to the latest version (sudo npm install -g npm@latest ) and clearing npm’s cache (npm cache clean ) didn’t help either. After examining the downloaded temporary packages in /tmp I realized that they were corrupt. The corrupt packages changed randomly on every download attempt. Changing the temporary directory from /tmp to another location did not resolve the issue. Every user on the machine was affected by the problem. ...

April 25, 2016 · 2 min

Simulate the environment of Cron Jobs

Often you will find yourself in the situation that one of your cron jobs works perfectly if you execute it manually but fails as soon as is gets executed by cron. The root cause might be the different environment. To simulate the environment of a cron job add the following entry to your crontab using crontab -e. This will create the file cronenv in your root directory and dump all available environment variables into it. Once the file was created remove the entry from your crontab and take a look at its contents: ...

March 21, 2016 · 1 min

Ubuntu: Mount encrypted home directory

After changing harddrives I needed to transfer some files from the old harddrive which had an encrypted home directory. The command sudo ecryptfs-recover-private did not work: sudo ecryptfs-recover-private /home/.ecryptfs/user/.ecryptfs/ INFO: Found [/home/.ecryptfs/user/.ecryptfs/]. Try to recover this directory? [Y/n]: INFO: Found your wrapped-passphrase Do you know your LOGIN passphrase? [Y/n] INFO: Enter your LOGIN passphrase... Passphrase: Inserted auth tok with sig [f7402d552edaa194] into the user session keyring mount: mount(2) failed: No such file or directory ERROR: Failed to mount private data at [/tmp/ecryptfs.p3BXsWqk]. http://askubuntu.com/a/36783 pointed me in the right direction. First mount the old hard drive in the new Ubuntu installation. Then run ...

February 3, 2016 · 1 min

Gnome 3: Minimize, Maximize and Close on the left

gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize,close:'

October 11, 2015 · 1 min

Debian 8: gdm3 crashes instantly with "Oh no! Something has gone wrong"

After upgrading several Gnome 3 (and other) packages and rebooting I was unable to get to the gdm3 login screen. It crashed instantly with the message “Oh no! Something has gone wrong”. After checking various log files and consulting the internet I found a bug report which provided a (very simple) solution: sudo adduser Debian-gdm video That’s it.

October 8, 2015 · 1 min

seafile-cli: "waiting for sync" and "status unknown"

If you’re runing the latest version of seafile-cli (4.3.2) on Debian you might encounter the following error in your seafile.log: http-tx-mgr.c(653): libcurl failed to GET https://domain.tld/seafhttp/protocol-version: Problem with the SSL CA cert (path? access rights?). This is because the client is built on CentOS where the CA certificates reside in a different location. Luckily there is an easy fix available (see https://seacloud.cc/group/3/wiki/seafile-cli-manual/) : sudo mkdir -p /etc/pki/tls/certs sudo cp /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt sudo ln -s /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/cert.pem That’s it – restart your client and it should sync again. ...

September 14, 2015 · 1 min

fix mouse pointer speed in Gnome 3.16

When upgrading to Gnome 3.16 you might find yourself in the situtation that your mouse pointer speed has changed. To revert this run the following command: /usr/bin/xset m default

July 3, 2015 · 1 min

Apache 2: [authz_core:error] client denied by server configuration

When upgrading Apache to version 2.4 some of your config files need to be changed. Allow from all needs to be changed to Require all granted Otherwise your virtualhost config is not correct and Apache won’t work correctly.

May 23, 2015 · 1 min

Dovecot: login problems with Outlook

When all mail clients are working fine with dovecot – Outlook won’t. The first thing you might want to check resides in the following file: /etc/dovecot/conf.d/10-auth.conf The default value for disable_plaintext_auth is “yes” – change it to “no”: disable_plaintext_auth = no

May 22, 2015 · 1 min