Skip to content

Bash CLI toolkit for Linux system administration. Automates core tasks like user management, system backups, updates, log maintenance, and firewall management with clean output, help menus, and logging.

Notifications You must be signed in to change notification settings

Cyber-Security-Tech/bash-admin-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

🛠️ Admin Automation Toolkit: Bash CLI Scripts for Linux System Management

A professional-grade toolkit for Linux system administrators, featuring robust Bash CLI scripts to automate core user management, system maintenance, backups, updates, firewall management, and system monitoring.


📋 Overview

This toolkit demonstrates real-world Linux system administration tasks automated through modular, production-ready Bash scripting — with error handling, help menus, colorful outputs, and logging included.

Each script is designed for operational efficiency, clean terminal UX, and secure system management practices.


🚀 Scripts Included

Script Purpose
create_user.sh Add a new user, set initial password, and force password change on first login
remove_user.sh Safely delete a user and archive their home directory
backup_system.sh Create compressed full system backups with timestamps
update_and_patch.sh Fully update and upgrade the system with logging
log_cleaner.sh Rotate and archive old system logs automatically
show_system_info.sh Display system uptime, CPU load, disk usage, and memory usage
firewall_manager.sh Open or close firewall ports easily (optional bonus script)

✨ Key Features

  • Professional CLI design with banners and colorful output
  • Full --help menus for every script
  • Graceful error handling
  • Real-time system and user lifecycle management
  • Logging of critical operations
  • Timestamped backups and archival
  • Firewall port management
  • Modular and clean Bash scripting
  • Linux-friendly and production-grade

📂 Folder Structure

bash-admin-toolkit/
├── scripts/
│   ├── create_user.sh
│   ├── remove_user.sh
│   ├── backup_system.sh
│   ├── update_and_patch.sh
│   ├── log_cleaner.sh
│   ├── show_system_info.sh
│   ├── firewall_manager.sh
├── demos/
│   ├── create_user_demo.gif
│   ├── backup_demo.gif
│   ├── patch_demo.gif
│   ├── log_cleaner_demo.gif
│   ├── show_system_info_demo.gif
│   ├── firewall_manager_demo.gif
├── README.md

📸 Demos

Script Demo
Create User Create User Demo
System Backup Backup Demo
System Update & Patch Patch Demo
Log Cleaner Log Cleaner Demo
Show System Info System Info Demo
Firewall Manager Firewall Manager Demo

🧐 Example Usage

# Create a new user
sudo ./scripts/create_user.sh -u devops_admin -p Welcome123!

# Remove a user safely
sudo ./scripts/remove_user.sh -u olduser

# Backup critical system folders
sudo ./scripts/backup_system.sh

# Update and patch the system
sudo ./scripts/update_and_patch.sh

# Clean up old logs
sudo ./scripts/log_cleaner.sh

# Show system stats
./scripts/show_system_info.sh

# Open firewall port 443
sudo ./scripts/firewall_manager.sh --open 443

📜 Requirements

  • Bash 4.0+
  • Linux OS (Debian/Ubuntu preferred)
  • Root permissions for most scripts
  • ufw installed for firewall management (optional)

📈 What I Learned

  • Real-world automation of Linux system administration tasks
  • Writing modular, maintainable Bash scripts
  • Building user-friendly CLI interfaces
  • Managing Linux system users, backups, logs, firewalls
  • Logging operational tasks securely

⚡ How to Run Locally

  1. Clone this repo:
    git clone https://github.com/your-username/bash-admin-toolkit.git
  2. Move into the project:
    cd bash-admin-toolkit
  3. (On Linux) Make all scripts executable:
    chmod +x scripts/*.sh
  4. Run any script (most require sudo):
    sudo ./scripts/create_user.sh --help

🌟 Future Improvements

  • Add an interactive menu-based launcher script
  • Add system health checks before backups
  • Extend support to CentOS/RHEL systems (yum, dnf)
  • Build a web dashboard to manage scripts remotely

💪 This project proves the ability to design, automate, and maintain core Linux administration workflows through modular Bash scripting, improving operational efficiency, system reliability, and security.

About

Bash CLI toolkit for Linux system administration. Automates core tasks like user management, system backups, updates, log maintenance, and firewall management with clean output, help menus, and logging.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages