create_users.sh is a Bash script for automating the creation of users and groups, setting up home directories, generating random passwords, logging actions, and securely storing passwords.
To run the script:
sudo ./create_users.sh users.txt
For detailed output during execution:
sudo ./create_users.sh -v users.txt
To simulate user creation without making changes:
sudo ./create_users.sh -d users.txt
Ensure your users.txt file is formatted as follows:
`username1;group1,group2
username2;group3,group4`
light;sudo,dev,www-data
idimma;sudo
mayowa;dev,www-data
- The script logs actions to
/var/log/user_management.log. - Passwords are securely stored in
/var/secure/user_passwords.txt. - Existing password files are backed up before any changes are made.
This project is licensed under the MIT License.