Skip to content

DreadFox Account Disk Checker

Choose a tag to compare

@Dread-Fox Dread-Fox released this 10 Dec 07:06
9fc1fa2

Program Description: DreadFox Account Disk Checker
Overview:
The DreadFox Account Disk Checker is a robust system administration tool designed to monitor user account activity and disk space usage on a Linux system. It offers real-time alerts, detailed logging, and auditing features, making it ideal for administrators managing multiple user accounts and systems.

Features:

Disk Usage Monitoring:

Monitors root disk space usage.
Sends email alerts to an administrator if usage exceeds warning (80%) or critical (90%) thresholds.
Logs disk usage metrics with timestamps for audit purposes.
User Account Checks:

Lists and allows selection of active users (excluding system accounts).
Displays account details, including home directory location and last login time.
Tracks new users and logs them in an audit file (/var/log/user_audit.log).
Active File and Process Tracking:

Shows the last 10 files accessed by the selected user.
Lists the largest files in the user’s home directory.
Displays the top 10 active processes owned by the user, sorted by memory usage.
Audit and Logging:

Maintains a centralized log file (/var/log/account_disk_checker.log) for all system checks.
Logs changes in user accounts, disk usage, and processes.
Provides commands for reviewing logs easily.
Interactive Setup:

Prompts the administrator to input an email address for alerts.
Ensures the mail utility is installed and configured, installing it automatically if necessary.
Purpose: This script is tailored for:

System Administrators: Automate monitoring of disk usage and user activity.
Security Auditors: Track new users and generate detailed system logs.
Resource Managers: Identify large files and resource-heavy processes to optimize system performance.
How to Use:

Run the Script:

Execute the script with root privileges to ensure access to system information.
Set Administrator Email:

Enter an email address to receive alerts for critical system events.
Select a User:

Choose an account to monitor from the displayed list.
Review Outputs:

Access detailed logs and alerts via terminal output and email.
View stored logs at:
Main Log: /var/log/account_disk_checker.log
Audit Log: /var/log/user_audit.log
Log Viewing Commands:

cat /var/log/account_disk_checker.log — View main logs.
cat /var/log/user_audit.log — View audit logs.
Important Notice:

Ensure the script is used only on systems you own or have administrative rights to.
Adhere to local and organizational policies regarding system monitoring.