Create a Bash script to automate the creation of user accounts, generates random initial passwords, and enforces password change on first login.
The script reads user data from a CSV file, allowing for the bulk provisioning of user accounts with enhanced security.
Key Features:
➤ Create A CSV file: Create a CSV file with a usernames and full-names.
CSV Data Input: Read user data from a CSV file for batch user account creation.
User Account Creation: Create user accounts with specified usernames and full names.
Random Password Generation: Generate strong, random passwords for each user. Root Privilege Check: Ensure that the script is run with root privileges for user management.
=======
This project provides a Bash script for managing user accounts on a Linux system. It aims to automate tasks like adding, deleting, and modifying user accounts, which is useful for system administrators to streamline user management.
This script is part of a larger system administration project aimed at simplifying user account management on Linux-based systems.
- Clone the repository:
git clone https://github.com/hasannader2040/User-Account-Management-Using-A-Bash-Script.git`
- Navigate to the directory:
cd User-Account-Management-Using-A-Bash-Script`
- Make the script executable:
chmod +x user-mangment.sh`
- Run the script:
./user-mangment.sh`
- Bash: For scripting.
- Linux command line utilities:
useradd
,userdel
,usermod
, etc.
- Add a user:
./user-mangment.sh add <username>
## Delete a user:
```console
./user-mangment.sh delete <username>
./user-mangment.sh modify <username> <options>
This script should be run with root or sudo privileges to perform user management tasks.
You can copy this into your README.md file to document your project. If you need any adjustments or further details, feel free to ask!
d8a2bcd (adding README.md)
The core idea is to streamline user management operations, making it easier for system administrators to handle tasks efficiently. The script eliminates the need for manual execution of multiple commands by providing a more straightforward and automated way to manage users. By using this script, repetitive tasks are automated, reducing the chances of human error and improving overall efficiency.
Benefits in Real-Time: Time Efficiency: It automates repetitive user management tasks, saving significant time for system administrators. Instead of manually running individual commands for each user, the script can handle it all in one go.
Error Reduction: By automating user account tasks, it minimizes the potential for errors that could arise when manually managing users (e.g., typos in commands or forgetting a step).
Consistency: It ensures that all user accounts are created and managed consistently with predefined configurations, making the environment more uniform and easier to maintain.
Scalability: As the number of users grows, manually managing accounts becomes more challenging. This script allows the process to scale easily by handling multiple users in batch.
Security: The script can include security measures, such as setting password policies or enforcing certain permission levels, improving the overall security of the system.
Automation: This aligns well with modern DevOps practices, where automation of system tasks is key to maintaining efficient, scalable infrastructure.