Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI User Management System (Python)

A command-line based User Management System built using Python.
The application supports secure authentication, role-based access control, and admin-managed user operations with persistent storage.


🚀 Features

🔐 Authentication & Security

  • Secure login using SHA-256 password hashing
  • Hidden password input using getpass
  • First-run admin bootstrap
  • Session-based login handling

👤 Role-Based Access

  • Admin and User roles
  • Strict authorization enforcement
  • Users cannot access admin features

🛠️ Admin Capabilities

  • Create users (with role assignment)
  • View all users (passwords hidden)
  • Update user role or password
  • Delete users with safety checks
    • Cannot delete self
    • Cannot delete last remaining admin

🙋 User Capabilities

  • View own profile
  • Change own password securely
  • Logout safely

💾 Persistence & Safety

  • JSON-based persistent storage
  • Input validation and error handling
  • Graceful program exit

🧱 Project Structure

cli-user-management/ │ ├── main.py # Application entry point ├── storage.py # JSON load/save utilities ├── users.json # Persistent user data ├── README.md └── .gitignore

▶️ How to Run

Prerequisites

  • Python 3.x

Steps

git clone <your-repo-url>
cd cli-user-management
python main.py

On first run, you will be prompted to create an admin account.


🧪 Sample Flow
Welcome to CLI User Management System

1. Login
2. Exit

Login successful!
Welcome admin

--- Admin Menu ---
1. Create User
2. View Users
3. Update User
4. Delete User
5. Logout

🧠 Key Learnings

Python CLI application design

Secure password handling

Role-based authorization

File-based persistence

Clean modular coding practices

📌 Future Improvements

Login attempt limits

Activity logs

Export users

Web version using Flask/FastAPI


👨‍💻 Author

Sooraj Suresh

About

A Python-based CLI User Management System with secure authentication, role-based access control, admin CRUD operations, and persistent JSON storage.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages