Category: r00t
-
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))
-
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…
-
Matrox G550 dual monitor
Sometimes Google is just not enough. Especially when you’ve clicked hundreds of results, hoping you will find the right answer to your problem. My problem was the Matrox G550 video card and its missing drivers for the modern, nowadays versions of Linux. In my case, the distro is Ubuntu. I have tried to do everything I found…
-
How To reset the root password in (Debian) Linux
Many times I was in the situation where I am creating an account on a website and asking myself “what will I do if I forget the password?” and then check if that website offers the option of password recovery. When this situation is about the computer you’re using, there is no such option, so…