If you run a embedded Linux PC like raspi often some Linux Commands fail without error messages, cause the hardware performance is low tech. Same i have seen on the split command.. to split a 50GB Photos-Archive File to 4Gb on a USB Drive i found out that: sudo split -b 4096m -d -u Photos.tgz Photos-Archive_ fix the job.. Cause option -u disable IO-Caching over the 2.0 USB Port to the RAM of the raspi that the Data of the Output Stream is written direct to the Drive.
If you use a Toshiba Canvio 3tb Drive at a raspi then smartmontools will not see the usb drive. Try: sudo smartctl -t long -d sat -s on /dev/sdb -t test long or short -d drive protocol sata = sat -s enforce smart which is off by the usb drive firmware wait XXX Minutes then: sudo smartctl -H -d sat -s on /dev/sdb get status..
If you use a Mail Server with Postfix you got daily Spam Attacks by Scripts: How to fix? Install ufw Firewall Run a Scanner Script as cronjob On Debian/Ubuntu: Install ufw: sudo apt-get update && sudo apt-get install ufw && sudo ufw enable && sudo ufw logging off Scan Script: sudo nano /home/user/firewall-update.sh: #!/bin/bash # scan rejected cat /var/log/mail.log | grep rejected | cut -d"[" -f3 | cut -d"]" -f1|grep -v '^$' > /tmp/firewall.txt # insert to Firewall while read line; do sudo ufw insert 1 deny from $line to any; done < /tmp/firewall.txt # scan "denied" cat /var/log/mail.log | […]
If you use SSH Logins to your Systems, you perhaps want to know, who logged in last days and from which IP Address. Screenshot SSH Login Echo LAST Info: Howto: Open the .profile File at your Home with a Editor and enter: clear last -n 4 This will echo after login the last 4 Logins including the used IP’s To prevent Hackers to purge the lines set the .profile File “readonly” sudo chmod 444 .profile sudo chown root:root .profile
If you own a raspberry pi, in some cases it is useful to shrink the sdcard, cause you need often not more than 8/16GB. What do you need and how to solve shinking or extending the OS: Hardware you need: 2 empty SDCards (Source + Dest.) 2 SDCard Adaptors Micro-SD to SD Fullsize 2 SD-USB Card Readers, i use them for stable work, cause USB SDCard Readers on Laptops often fails (Shared Sources) 1 Laptop with Ubuntu CD inside the CD-Rom or installed ubuntu with gparted Howto: Plug the Cards into the Adaptors and into the Readers, connect to the […]
If you use a raspberry pi for projects which is shipped with a 8GB SDCard it is very useful to know basics about the root, file and recovery system on the preinstalled card. Major Basics about the Partitioning you find here To save time the raspberry pi offers possibility to run a Full Backup if the pi is ONLINE! Cause the OS is running from RAM like Live Mode! For Backup you need a USB to SDCard Reader with Adaptor Micro SD to SD, and a second SDCard i use 16GB Class 10 Plugin the new SDCard into the Adaptor and into […]