Wednesday, January 14, 2026

Check for SMART status on Debian

 Install smartmontools and use smartctl:

sudo smartctl --all /dev/xxx


Sunday, September 7, 2025

Adding a Samba user and setting the password

I almost always forget to add users to Samba group after enabling Samba. So here it is:

sudo smbpasswd -a <username>


Change service shutdown timeout in Debian

Make a change so that slow-non/responding services to terminate quickly during shutdown:

sudo nano /etc/systemd/system.conf

Uncomment and edit to:

DefaultTimeoutStopSec=5s

Reboot or reload with:

sudo systemctl daemon-reload


Change GRUB boot delay

sudo nano /etc/default/grub
sudo update-grub

Adding ufw rules using application profiles while restricting source network

Unfortunately, the ufw help doesn't provide an example for using application profiles while specifying the source network. Here's an example how "OpenSSH" profile can be used but restricting the source network to local:

sudo ufw allow from 192.168.0.0/24 to any app OpenSSH