linux

Using sudo and screen

The screen program requires write access to the pty of the logged in user. When using sudo, this no longer lines up and you'll get the ever useful error message:

Using find to fix permissions

Locate a file or directory without world readable permission
find . -type f ! -perm -o=r
find . -type d ! -perm -o=r
Fix the problem
find . -type f ! -perm -o=r -exec chmod o+r {} \;
find . -type d ! -perm -o=r -exec chmod o+rx {} \;

Irradicate Gnome Keyring SSH agent

Why? Because it doesn't work with ed25519 keys and utterly takes over the ability run the real one globally.

Modifying an existing initrd

It is sometimes useful to change an initrd to make additional programs available during initramfs shell.

To get to initramfs shell, add break=point to the kernel boot options, where point is one of top, modules, premount, mount, mountroot, bottom, init.

Extracting the contents of the initfs into a working directory:

Random Entropy

Random Entropy is used for all kinds of things on a linux server. You need enough of it for pretty much everything to work - to be able to generate sufficiently random numbers. On a VPS, it can be difficult to have enough events to generate sufficient entropy. If a server does a lot of crypto functions, it can also exhaust itself even if it is bare-metal. To get around it, there are a couple of daemons that can be installed.

Query the amount of random entropy available on a system:

$ cat /proc/sys/kernel/random/entropy_avail
3120

Bracketed Paste

Possibly the most annoying "feature" that could be added to a linux console window is for it to detect newlines and not treat them like the enter key. It can be temporarily disabled, but will undoubtedly re-enable itself after a while.

Act on files containing a matching string

Quite often it's not enough to simply find files that contain a certain string as you also want to do something with those files once found.

Linux Mint MATE screensavers

For some odd reason, most of the screen savers are not available for Linux Mint MATE, resulting in a list where the only useful one is "blank".

To fix it, the system configuration can simply be switched over to show them to be enabled with default settings.

KeePassX - A cross-platform encrypted password safe

I have a separate username and password for every single site I visit. I do this because I own numerous domains from which I allocate a site specific email address which in turn allows me to track which website leaked or sold my email when I get a spam. Even if I didn't do this, I would still need some kind of system to keep track of the million different usernames that I've had to come up with because of my normal name being taken, or some length restriction.

Subscribe to RSS - linux