/Project-One-Shell-Script

User Management Shell Script For Linux

Primary LanguageShell

User Management Script

Follow this link for user management: User Management Script

A simple Bash script for managing user accounts and groups on a Linux system. This script provides options to create, modify, delete user accounts, and manage groups effectively.

Usage

./usermanagement.sh [options]

Options

  • -c, --create: Create a new user account.
  • -cg, --create_group: Create a new group.
  • -lg, --list_group: List all users in a group.
  • -mg, --modify_group: Add multiple users to a group.
  • -d, --delete: Delete an existing user account.
  • -r, --reset: Reset the password of an existing user account.
  • -m, --modify: Modify a user's group.
  • -l, --list: List all user accounts on the system.
  • -h, --help: Display this help message.

Functions

Create a New User Account

./usermanagement.sh -c

Create a New Group

./usermanagement.sh -cg

List Users in a Group

./usermanagement.sh -lg

Add Users to a Group

./usermanagement.sh -mg

Delete a User Account

./usermanagement.sh -d

Reset User Password

./usermanagement.sh -r

Modify User's Group

./usermanagement.sh -m

List All User Accounts

./usermanagement.sh -l

Help

./usermanagement.sh -h

Notes

  • The script ensures proper error handling and provides clear success or error messages for each operation.
  • Make sure to run the script with appropriate privileges, especially for user-related operations.

Feel free to customize and extend the script based on your specific requirements and system configurations.

Backup Script

Follow this link: BackupScript