DEV Community

Cover image for πŸ›‘οΈ Linux Admin Project: Secure Bank Customer Portal with Automated Auditing
Rajpreet Gill
Rajpreet Gill

Posted on

1

πŸ›‘οΈ Linux Admin Project: Secure Bank Customer Portal with Automated Auditing

A Real-World Banking System Using useradd, chmod, ACLs, systemd, and More!

πŸš€ What if you could manage 10,000 bank customers using only Linux commands?
In this hands-on project, you’ll simulate a secure banking portal that handles users, enforces privacy, encrypts backups, and even triggers alerts on suspicious activity.

🏦 Scenario: You’re the Sysadmin for a Bank

Your Mission:

  • Give employees admin access (but safely).
  • Ensure customers can only access their data.
  • Maintain daily encrypted transaction logs.
  • Detect fraudulent logins in real time.

Let’s turn a regular Linux machine into a secure bank portal. πŸ’»πŸ’Έ

## πŸ“‘ Table of Contents

πŸ”§ Step 1: Create Users & Groups

πŸ›  Tools: useradd, usermod, groups

# Employees and Customers

Image description

Similarly, Create Groups, Assign Users to groups

sudo groupadd employees
sudo groupadd customers

sudo usermod -aG employees manager teller
sudo usermod -aG customers john jane

βœ… Why?

  • Groups control permissions.
  • Customers can’t peek into each other’s data.
  • Employees can manage transactions but not compromise privacy.

πŸ’° Step 2: Secure the Banking Directories

πŸ›  Tools: mkdir, chmod, chown, setfacl

# Create folders
Image description

# Permissions
Image description

Image description

# Let employees read but not write customer data
Image description

πŸ”’ Why?

  • chmod 700: Only the customer can access their folder.
  • setfacl: Employees can view but not edit customer files.
  • /bank/transactions: Editable only by employees.

πŸ” Step 3: Monitor Suspicious Activity

πŸ›  Tools: grep, journalctl, find

# Failed logins (fraud detection)

sudo grep "Failed password" /var/log/auth.log

Image description

Similarly, You can Check Suspicious activity by these commands:

# Audit sudo usage

sudo journalctl -q | grep "sudo.*COMMAND"

# Detect changes in the last hour

sudo find /bank -type f -mmin -60 -ls

🚨 Why?

  • Spot brute-force attacks and insider misuse.
  • Know who’s using sudo, when, and for what.
  • Track recent changes to sensitive files.

⏰ Step 4: Automate Encrypted Daily Backups

πŸ›  Tools: systemd, tar, gpg, cron

# 1. Backup script

Image description

# 2. Make executable

Image description

# 3. Systemd timer

Image description

# 4. Start the timer

Image description

πŸ—οΈ Why?

  • Protects data even if the system is breached.
  • Systemd ensures it runs reliablyβ€”even after reboot.

🏧 Step 5: Simulate a Customer Login

Image description

πŸ’» Demo: Bank Customer Login Simulation

Terminal GIF showing login flow

πŸ“˜ Conclusion

With just a few Linux commands, you've built a:
βœ… Secure multi-user bank portal
βœ… Automated encrypted backups
βœ… Real-time monitoring system

πŸ’‘ Want to take it further? Add:

  • Email alerts for suspicious logins
  • Web frontend using Apache/Nginx
  • PostgreSQL for storing balances

#30DaysLinuxChallenge #CloudWhisler
DevOps #Linux #RHCSA #Opensource #AWS #CloudComputing

Catch out by My LinkedIn profile
https://www.linkedin.com/in/rajpreet-gill-4569b4161/

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (1)

Collapse
 
nevodavid profile image
Nevo David β€’

been messing with user permissions before but tbh never thought about banking setups like this, feels like i'm missing a trick

DevCycle image

Ship Faster, Stay Flexible.

DevCycle is the first feature flag platform with OpenFeature built-in to every open source SDK, designed to help developers ship faster while avoiding vendor-lock in.

Start shipping