Author: Șerban
-
Wireguard not working in some cases with PPPoE connection
I am using a PPPoE connection to access the internet. Behind the router is my Wireguard server to which I connect from a remote location and use the VPN connection. I noticed that for some situations, the connection doesn’t work. Googling for the solution gave me a hint on tweaking the MTU of the connection…
-
Move a running process to a screen session
Suspend the process CTRL+Z Resume the process in background # bg Disown it # disown %1 If you have multiple jobs running, find the correct job number: # jobs -l Enter screen session # screen Find the PID of the process # pgrep processname Attach it to current screen session # reptyr PID
-
Execute cron on a specific day of the month
# Run on every second Tuesday of the month 20 4 8-14 * * test $(date +%u) -eq 2 && /usr/bin/bash /home/user/mytuesdayscript.sh Explanation: Run at 04:20 on every day-of-month from 8 through 14. 20 = 20th minute 4 = 4am 8-14 = between day 8 and day 14 (second week) * = every month * …
-
Destroy data on a filesystem by wiping first and last sectors
Wipe the first 1GB # dd if=/dev/zero of=/dev/sdX bs=1M count=1024 Wipe the last 1MB Some RAID configuration data might be present at the end of the disk, thus existing the need to delete this data, before reusing the disk # dd bs=1M if=/dev/zero of=/dev/sdX count=1024 seek=$((`blockdev –getsz /dev/sdX` – 1024))
-
Batch printer installation on multiple servers
Using the following bash script you can install multiple printers, on multiple servers. Each printer has its own description, location, PPD file (driver) and network path. All of these details are stored in a file called “printers.txt”, which is a TAB separated, 4 column list. Contents of printers.txt look like this: PR01 HPLJ4000 Office…
-
Bluetooth pairing with dual boot Windows & Linux
If you use dual-boot, with Windows & Linux, you probably found very annoying the fact that you have to pair all your Bluetooth devices again and again, because they just do not work with both operating systems. Here is a guide to solve this problem…
-
How to bypass hotel WiFi captive portal
How to bypass WiFi captive portal and gain permanent access to Internet, especially when you are checked in at a hotel.
-
Extract Windows serial number from BIOS
Recently I needed to reinstall Windows on a system and, unfortunately, I had lost the serial number. Using two simple Linux bash commands, I managed to find the serial number embedded into the computer’s BIOS. This is easy to accomplish on any computer and/or laptop that comes with Windows OS preinstalled. Below I have censored…
-
Backup & versioning with RSYNC
You may already know rsync – the powerful tool which you use to synchronize files from one location to another. I am using it on every Linux server that needs scheduled backups, but this time I had to not only backup some files, but also to keep track of previous versions, due to users being sloppy with…
-
Two WordPress tweaks
I have been searching for a way to make my personal blog more user friendly. In fact, this is what I keep doing, searching for better ways to tweak my WordPress blog. The first tweak was related to search results: I have noticed that the sorting is by date, in reverse order – from older to…