valgrind --leak-check=full ./your_program will show you any memory leaks, including the location where they occurred.
Solaris and Linux
Sunday, June 21, 2026
What is fstab.
The fstab (file system table) file is a configuration file located at /etc/fstab that contains information
about disk partitions and filesystems. It specifies how and where the filesystems are mounted, including the device
name, mount point, filesystem type, options, and dump/pass values. The system uses this file during boot to
automatically mount filesystems.
Tuesday, June 16, 2026
what is Fencing
Fencing is a safety mechanism used in clustered systems to isolate a failed or unresponsive node so it cannot corrupt shared resources such as storage, databases, or virtual machines.
In high-availability (HA) clusters, a node may lose communication with the rest of the cluster but continue running. This can lead to a split-brain situation where two nodes believe they own the same resource. Fencing prevents this by forcibly removing the problematic node from service.
Friday, June 12, 2026
How to check the httpd service is running on multiple hosts using bash and Ansible
Monday, June 8, 2026
Linux Host 2FA Configuration Guide
Two-Factor Authentication (2FA) on a Linux host is commonly configured using Google Authenticator PAM.
1. Install Google Authenticator
RHEL/Rocky/Oracle Linux:
sudo dnf install google-authenticator qrencode -y
Older systems:
sudo yum install google-authenticator qrencode -y
2. Configure OTP for a User
google-authenticator
Recommended answers:
- Time-based tokens: y
- Update .google_authenticator file: y
- Disallow multiple uses: y
- Increase time skew: n
- Enable rate limiting: y
3. Configure PAM
Edit /etc/pam.d/sshd and add:
auth required pam_google_authenticator.so
4. Configure SSH
Edit /etc/ssh/sshd_config and set:
ChallengeResponseAuthentication yes
UsePAM yes
PasswordAuthentication yes
For newer OpenSSH:
KbdInteractiveAuthentication yes
UsePAM yes
5. Restart SSH
sudo systemctl restart sshd
6. Test Login
ssh user@server-ip
You should be prompted for:
- Password
- Verification code (OTP)
Verify Logs:
RHEL:
sudo tail -f /var/log/secure
Ubuntu:
sudo tail -f /var/log/auth.log
Rollback:
Remove:
auth required pam_google_authenticator.so
from /etc/pam.d/sshd and restart sshd.